Blob


1 #!/bin/sh
3 if [ $# -eq 0 ]
4 then
5 echo 'usage: B cmd...' 2>&1
6 exit 1
7 fi
9 if [ "x$DISPLAY" = "x" ]
10 then
11 sam="/tmp/.sam.$USER"
12 else
13 sam="/tmp/.sam.$USER.$DISPLAY"
14 fi
16 if [ ! -p $sam ]
17 then
18 echo could not find sam 2>&1
19 exit 2
20 else
21 for i
22 do
23 pwd=`pwd`
24 file=`cleanname -d $pwd $i`
25 line=`echo $file | sed 's/.*://'`
26 file=`echo $file | sed 's/:.*//'`
27 echo "B $file" >>$sam
28 if [ "x$line" != "x" -a "x$line" != "x$file" ]
29 then
30 echo "$line" >> $sam
31 fi
32 done
33 fi