From b9b5cea4eda1c011cfc2e18c8b89987d4298cb7c Mon Sep 17 00:00:00 2001 From: rsc Date: Sat, 11 Oct 2003 03:55:45 +0000 Subject: Extra sam scripts. --- bin/B | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 bin/B (limited to 'bin/B') diff --git a/bin/B b/bin/B new file mode 100755 index 00000000..c1a4b163 --- /dev/null +++ b/bin/B @@ -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 -- cgit v1.2.3