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

Last change on this file since 337 was 258, checked in by alloc, 9 years ago

Scripts: License

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#!/bin/bash
2
3# Copyright 2016 Christian 'Alloc' Illy
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17
18. /usr/local/lib/7dtd/common.sh
19checkRootLoadConf
20
21if [ -z $1 ]; then
22 genericHelp
23else
24 CMD=$(camelcasePrep "$1")
25 shift
26
27 if [ "$CMD" = "Help" ]; then
28 if [ -z $1 ]; then
29 genericHelp
30 else
31 HELPCMD=$(camelcasePrep "$1")
32 if [ "$(type -t sdtdCommand${HELPCMD}Help)" = "function" ]; then
33 sdtdCommand${HELPCMD}Help
34 else
35 echo "Command \"$1\" does not exist!"
36 exit 1
37 fi
38 fi
39 else
40 if [ "$(type -t sdtdCommand${CMD})" = "function" ]; then
41 sdtdCommand${CMD} "$@"
42 else
43 echo "Command \"$CMD\" does not exist!"
44 exit 1
45 fi
46 fi
47fi
48
49exit 0
50
Note: See TracBrowser for help on using the repository browser.