diff options
author | rsc <devnull@localhost> | 2003-10-11 03:55:45 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2003-10-11 03:55:45 +0000 |
commit | b9b5cea4eda1c011cfc2e18c8b89987d4298cb7c (patch) | |
tree | 8925e7691c6a1694950fdda78eb7828d7fd45f85 /bin/B | |
parent | 00b80edb976f338a22fa8140b11e4b66c79b28d2 (diff) | |
download | plan9port-b9b5cea4eda1c011cfc2e18c8b89987d4298cb7c.tar.gz plan9port-b9b5cea4eda1c011cfc2e18c8b89987d4298cb7c.tar.bz2 plan9port-b9b5cea4eda1c011cfc2e18c8b89987d4298cb7c.zip |
Extra sam scripts.
Diffstat (limited to 'bin/B')
-rwxr-xr-x | bin/B | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -0,0 +1,33 @@ +#!/bin/sh + +if [ $# -eq 0 ] +then + echo 'usage: B cmd...' 2>&1 + exit 1 +fi + +if [ "x$DISPLAY" = "x" ] +then + sam="/tmp/.sam.$USER" +else + sam="/tmp/.sam.$USER.$DISPLAY" +fi + +if [ ! -p $sam ] +then + echo could not find sam 2>&1 + exit 2 +else + pwd=`pwd` + for i + do + case $i in + /*) + echo "B $i" >>$sam + ;; + *) + echo "B $pwd/$i" >>$sam + ;; + esac + done +fi |