Blob
1 #!/bin/sh3 if [ $# -eq 0 ]4 then5 echo 'usage: B file...' 2>&16 exit 17 fi9 for i10 do11 plumb $i12 done13 exit 015 if [ "x$DISPLAY" = "x" ]16 then17 sam="/tmp/.sam.$USER"18 else19 if [ "$DISPLAY" = ":0" ]20 then21 DISPLAY=:0.022 fi23 sam="/tmp/.sam.$USER.$DISPLAY"24 fi26 if [ ! -p $sam ]27 then28 echo could not find sam 2>&129 exit 230 else31 for i32 do33 pwd=`pwd`34 file=`cleanname -d $pwd $i`35 line=`echo $file | sed 's/.*://'`36 file=`echo $file | sed 's/:.*//'`37 echo "B $file" >>$sam38 if [ "x$line" != "x" -a "x$line" != "x$file" ]39 then40 echo "$line" >> $sam41 fi42 done43 fi