aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2003-10-11 03:58:19 +0000
committerrsc <devnull@localhost>2003-10-11 03:58:19 +0000
commit93fb47050c80d20d668035c7d1b89d610c1aa7d8 (patch)
tree3718115c811b69f96d69162a6d7d29b4787e8ac8 /bin
parentb9b5cea4eda1c011cfc2e18c8b89987d4298cb7c (diff)
downloadplan9port-93fb47050c80d20d668035c7d1b89d610c1aa7d8.tar.gz
plan9port-93fb47050c80d20d668035c7d1b89d610c1aa7d8.tar.bz2
plan9port-93fb47050c80d20d668035c7d1b89d610c1aa7d8.zip
B then wait.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/Bwait17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/Bwait b/bin/Bwait
new file mode 100755
index 00000000..1c6ef96f
--- /dev/null
+++ b/bin/Bwait
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# run B but then wait for the file to change.
+# great to set as $EDITOR.
+# the notion of a file changing is a little weak.
+
+stat=`ls -l $1`
+B "$@"
+while true
+do
+ nstat=`ls -l $1`
+ if [ "$stat" eq "$nstat" ]
+ then
+ exit
+ fi
+done
+