blob: c0763e716e69854a72f3e7bf7a3b5585dc3719aa (
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#!/bin/bash
# $Header: /var/cvsroot/gentoo-x86/games-server/halflife-statsme/files/modsetup,v 1.1 2003/09/10 05:51:11 vapier Exp $
source GENTOO_CFGDIR/modsetup.conf || { echo "Could not find config file!" ; exit 1 ; }
moddir=${PWD}
plugindir=${moddir}/../addons/statsme-HLMODDIR/
gen_default_cfgs() {
mkdir ${moddir}/addons
ln -s ../../addons/statsme-`basename ${moddir}` addons/statsme
#local m=${moddir}
#local c=${plugindir}/
#for f in statsme.cfg ; do
# [ ! -e ${m}/${f} ] \
# && cp ${c}/${f} ${m}/
#done
}
while :; do
case $1 in
help)
file=`dialog --title "Statsme help" \
--menu "Select Help File:" 16 80 10 \
sm_readme.txt.gz 'Basic readme' \
sm_changelog.txt.gz 'Changelog file' \
http://docs.unitedadmins.com/statsme/en/index.htm 'Online Docs' \
http://docs.unitedadmins.com/statsme/en/config.htm 'Configuration Docs' \
http://docs.unitedadmins.com/statsme/en/commands.htm 'Commands' 2>&1`
[ $? -eq 0 ] || exit 0
[ "${file:0:4}" != "http" ] && file=/usr/share/doc/halflife-statsme-*/${file}
[ "${file:${#file}-3}" == "htm" ] \
&& ${BROWSER} ${file} \
|| less ${file}
;;
config)
gen_default_cfgs
file=`dialog --title "Statsme config files" \
--help-button \
--menu "Select file to Edit:" 16 80 10 \
statsme.cfg 'Main configuration file' 2>&1`
if [ "${file:0:4}" == "HELP" ] ; then
$0 help
else
[ -z "${file}" ] && exit 0
${EDITOR} ${moddir}/addons/statsme/${file}
fi
;;
*)
exit 0
;;
esac
done
|