2003-10-11 03:55:45 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2004-02-29 22:42:33 +00:00
|
|
|
files=""
|
|
|
|
dest=""
|
|
|
|
|
2003-10-11 03:55:45 +00:00
|
|
|
if [ $# -eq 0 ]
|
|
|
|
then
|
2003-12-03 22:50:48 +00:00
|
|
|
echo 'usage: B file...' 2>&1
|
2003-10-11 03:55:45 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "x$DISPLAY" = "x" ]
|
|
|
|
then
|
|
|
|
sam="/tmp/.sam.$USER"
|
|
|
|
else
|
2003-12-03 22:50:48 +00:00
|
|
|
if [ "$DISPLAY" = ":0" ]
|
|
|
|
then
|
|
|
|
DISPLAY=:0.0
|
|
|
|
fi
|
2003-10-11 03:55:45 +00:00
|
|
|
sam="/tmp/.sam.$USER.$DISPLAY"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -p $sam ]
|
|
|
|
then
|
2004-04-19 05:51:41 +00:00
|
|
|
pwd="`pwd`"
|
2004-02-29 22:42:33 +00:00
|
|
|
for i
|
|
|
|
do
|
2004-04-23 06:51:06 +00:00
|
|
|
i=`cleanname -d "$pwd" "$i"`
|
|
|
|
plumb -s B -d edit "$i"
|
2004-02-29 22:42:33 +00:00
|
|
|
done
|
2003-10-11 03:55:45 +00:00
|
|
|
else
|
|
|
|
for i
|
|
|
|
do
|
2003-11-23 18:29:08 +00:00
|
|
|
pwd=`pwd`
|
|
|
|
file=`cleanname -d $pwd $i`
|
2003-12-02 21:57:32 +00:00
|
|
|
line=`echo $file | sed 's/.*://'`
|
|
|
|
file=`echo $file | sed 's/:.*//'`
|
2003-11-23 18:29:08 +00:00
|
|
|
echo "B $file" >>$sam
|
2003-12-02 21:57:32 +00:00
|
|
|
if [ "x$line" != "x" -a "x$line" != "x$file" ]
|
|
|
|
then
|
|
|
|
echo "$line" >> $sam
|
|
|
|
fi
|
2003-10-11 03:55:45 +00:00
|
|
|
done
|
|
|
|
fi
|