aboutsummaryrefslogtreecommitdiff
path: root/bin/awd
blob: 584b105129d6cb543ccf0ba49ed745ec1a4624dd (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 -s`
	;;
*)
	usage
esac

p="`pwd`"
case "$p" in
*/)
	label $p-$sys
	;;
*)
	label $p/-$sys
esac