From 5fa0329137c65d51d2ee14fa58eea07f139cf7c3 Mon Sep 17 00:00:00 2001 From: rsc Date: Sun, 23 Jul 2006 14:41:55 +0000 Subject: better status --- dist/isum.awk | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/dist/isum.awk b/dist/isum.awk index cb29eb31..476c6ea9 100644 --- a/dist/isum.awk +++ b/dist/isum.awk @@ -10,21 +10,22 @@ BEGIN { updates = "/dev/stderr" } -function clearstatus( i) +function clearstatus( noflush, i) { if(!updates) return for(i=0; iupdates statuslen = 0 - fflush(updates) + if(!noflush) + fflush(updates) } 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 -- cgit v1.2.3