source: scripts/usr/local/bin/7dtd.sh@ 22

Last change on this file since 22 was 17, checked in by alloc, 11 years ago

Version 4

  • Property svn:executable set to *
File size: 597 bytes
RevLine 
[17]1#!/bin/bash
2# Version 4
3
4. /usr/local/lib/7dtd/common.sh
5checkRootLoadConf
6
7if [ -z $1 ]; then
8 genericHelp
9else
10 CMD=$(camelcasePrep "$1")
11 shift
12
13 if [ "$CMD" = "Help" ]; then
14 if [ -z $1 ]; then
15 genericHelp
16 else
17 HELPCMD=$(camelcasePrep "$1")
18 if [ "$(type -t sdtdCommand${HELPCMD}Help)" = "function" ]; then
19 sdtdCommand${HELPCMD}Help
20 else
21 echo "Command \"$1\" does not exist!"
22 exit 1
23 fi
24 fi
25 else
26 if [ "$(type -t sdtdCommand${CMD})" = "function" ]; then
27 sdtdCommand${CMD} "$@"
28 else
29 echo "Command \"$CMD\" does not exist!"
30 exit 1
31 fi
32 fi
33fi
34
35exit 0
36
Note: See TracBrowser for help on using the repository browser.