diff options
author | rsc <devnull@localhost> | 2005-01-30 16:28:53 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-01-30 16:28:53 +0000 |
commit | 01bcf9f98223e08ec51a34bec5977110ddd94814 (patch) | |
tree | 5261df29b69adb8dbdef5dc5f65eeb23a5dea63c /bin/awd | |
parent | 9fe5a6216669a8f32c9bb6375b396db88961f7d8 (diff) | |
download | plan9port-01bcf9f98223e08ec51a34bec5977110ddd94814.tar.gz plan9port-01bcf9f98223e08ec51a34bec5977110ddd94814.tar.bz2 plan9port-01bcf9f98223e08ec51a34bec5977110ddd94814.zip |
respect sysname
Diffstat (limited to 'bin/awd')
-rwxr-xr-x | bin/awd | 29 |
1 files changed, 28 insertions, 1 deletions
@@ -1,3 +1,30 @@ #!/bin/sh -label `pwd` +usage() { + echo 'usage: awd [label]' 1>&2 + exit 1 +} +case $# in +1) + case "$1" in + -*) + usage + ;; + esac + sys=$1 + ;; +0) + sys=`hostname` + ;; +*) + usage +esac + +p="`pwd`" +case "$p" in +*/) + label $p-$sys + ;; +*) + label $p/-$sys +esac |