mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
17 lines
246 B
Bash
Executable file
17 lines
246 B
Bash
Executable file
#!/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 sleep 1
|
|
do
|
|
nstat=`ls -l $1`
|
|
if [ "x$stat" != "x$nstat" ]
|
|
then
|
|
exit
|
|
fi
|
|
done
|
|
|