plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

awd (317B)


      1 #!/bin/sh
      2 
      3 usage() {
      4 	echo 'usage: awd [label]' 1>&2
      5 	exit 1
      6 }
      7 case $# in
      8 1)
      9 	case "$1" in
     10 	-*)
     11 		usage
     12 		;;
     13 	esac
     14 	sys=$1
     15 	;;
     16 0)
     17 	# hostname -s sets the hostname to "-s" on Solaris
     18 	sys=${sysname:-$(hostname |sed 's/\..*//')}
     19 	;;
     20 *)
     21 	usage
     22 esac
     23 
     24 p="`pwd`"
     25 case "$p" in
     26 */)
     27 	label $p-$sys
     28 	;;
     29 *)
     30 	label $p/-$sys
     31 esac