summaryrefslogtreecommitdiff
path: root/time/asclock/files/asclock.sh
blob: 1dbc582461fdd1be54ababdfbc3abf2310337699 (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
31
32
33
34
35
36
#!/bin/sh
#
# $NetBSD: asclock.sh,v 1.1.1.1 2000/12/17 23:32:12 wiz Exp $

args=''
while [ $# -gt 0 ]
do
	case $1 in
	-lang)
		LANG=$2; shift
		if [ -z "${LANG}" ]
		then
			echo "asclock: -lang needs a language option"
			quit 1
		fi
		;;
	*)
		args="${args} $1"
		;;
	esac
	shift
done

ASCLOCKDIR=@PREFIX@/share/asclock-classic

# default to American English
if [ -z "${LANG}" -o ! -d ${ASCLOCKDIR}/${LANG} ]
then
	LANG=en
fi

monthxpm=${ASCLOCKDIR}/${LANG}/month.xpm
weekdayxpm=${ASCLOCKDIR}/${LANG}/weekday.xpm

args="${args} -monthxpm ${monthxpm} -weekdayxpm ${weekdayxpm}"
exec @PREFIX@/libexec/asclock-classic ${args}