-
Notifications
You must be signed in to change notification settings - Fork 6
/
start
executable file
·52 lines (43 loc) · 796 Bytes
/
start
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
#!/bin/sh
#
# $Id$
# Can be set with '--config-dir=DIR'
DIR=configurations
# Breaks on linux when using symlinks.
dn="`dirname "$0"`"
case "$dn" in
""|".")
;;
*)
if [ ! "$dn" = "`pwd`" ]
then
cd "$dn"
fi
;;
esac
parse_args()
{
while [ ! c"$1" = "c" ]
do
case "$1" in
--config-dir=*)
DIR=`echo "$1" | sed -e 's/--config-dir=//'`
FILES=`echo "$1" | sed -e's/--config-dir=//' -e's/\.//g' -e's./..g' -e 's.-..g'`
;;
esac
shift
done
}
if [ ! c"$ROXEN_ARGS" = "c" ]
then
parse_args $ROXEN_ARGS
fi
parse_args "$@"
SERVER_VER="$DIR/server_version"
if [ -f "$SERVER_VER" ]
then
SERVER_DIR=`cat "$SERVER_VER"`
else
SERVER_DIR=server
fi
cd "$SERVER_DIR" && exec ./start "$@"