plan9port/bin/awd
2005-02-14 07:37:11 +00:00

30 lines
239 B
Bash
Executable file

#!/bin/sh
usage() {
echo 'usage: awd [label]' 1>&2
exit 1
}
case $# in
1)
case "$1" in
-*)
usage
;;
esac
sys=$1
;;
0)
sys=`hostname -s`
;;
*)
usage
esac
p="`pwd`"
case "$p" in
*/)
label $p-$sys
;;
*)
label $p/-$sys
esac