2003-10-11 03:58:19 +00:00
|
|
|
#!/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 "$@"
|
2005-03-18 19:32:19 +00:00
|
|
|
echo editing "$@"
|
2004-04-21 21:01:52 +00:00
|
|
|
while sleep 1
|
2003-10-11 03:58:19 +00:00
|
|
|
do
|
|
|
|
|
nstat=`ls -l $1`
|
2003-11-23 18:29:08 +00:00
|
|
|
if [ "x$stat" != "x$nstat" ]
|
2003-10-11 03:58:19 +00:00
|
|
|
then
|
|
|
|
|
exit
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
|