mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
better status
This commit is contained in:
parent
32a580f43c
commit
5fa0329137
1 changed files with 10 additions and 8 deletions
16
dist/isum.awk
vendored
16
dist/isum.awk
vendored
|
@ -10,13 +10,14 @@ BEGIN {
|
|||
updates = "/dev/stderr"
|
||||
}
|
||||
|
||||
function clearstatus( i)
|
||||
function clearstatus( noflush, i)
|
||||
{
|
||||
if(!updates)
|
||||
return
|
||||
for(i=0; i<statuslen; i++)
|
||||
printf("\b \b") >updates
|
||||
statuslen = 0
|
||||
if(!noflush)
|
||||
fflush(updates)
|
||||
}
|
||||
|
||||
|
@ -24,7 +25,7 @@ function status(s)
|
|||
{
|
||||
if(!updates)
|
||||
return
|
||||
clearstatus()
|
||||
clearstatus(1)
|
||||
printf(" %s ", s) >updates
|
||||
statuslen = length(s)+5
|
||||
fflush(updates)
|
||||
|
@ -75,6 +76,12 @@ debug!=0 { print "# " $0 }
|
|||
next
|
||||
}
|
||||
|
||||
/^cd .+; mk .+/ && !verbose {
|
||||
dir = $2
|
||||
sub(/;$/, "", dir)
|
||||
status(dir " mk " $4)
|
||||
}
|
||||
|
||||
/^cd / {
|
||||
if(debug) print "% cd"
|
||||
errors = 0
|
||||
|
@ -86,11 +93,6 @@ debug!=0 { print "# " $0 }
|
|||
fflush(copy)
|
||||
}
|
||||
}
|
||||
else{
|
||||
dir = $2
|
||||
sub(/;$/, "", dir)
|
||||
status(dir)
|
||||
}
|
||||
cd = $0 "\n"
|
||||
cmd = ""
|
||||
next
|
||||
|
|
Loading…
Reference in a new issue