aboutsummaryrefslogtreecommitdiff
path: root/bin/awd
blob: d45666ba374a75467fb082448fcd9b7eb33a3f8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh

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