mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
B then wait.
This commit is contained in:
parent
b9b5cea4ed
commit
93fb47050c
1 changed files with 17 additions and 0 deletions
17
bin/Bwait
Executable file
17
bin/Bwait
Executable file
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue