summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-12-27 10:39:38 +0000
committerPaweł Redman <pawel.redman@gmail.com>2017-12-27 10:39:38 +0000
commit19d1fe92e846aa2b6a8c0fa2abe1c6d526dfae5a (patch)
treec0d286bf6fc6da92eb153188a11c481b4b8f7caa
parentd00b66f0ad70a293b5ee5e612d130d1269cfbd6c (diff)
Add support for fs_overpath.
-rwxr-xr-xrun-instance.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/run-instance.sh b/run-instance.sh
index f155648..05b9947 100755
--- a/run-instance.sh
+++ b/run-instance.sh
@@ -42,8 +42,9 @@ function check_dir {
source run-instance.local.sh || error "missing config\n"
[ -z "$PREFIX" ] && error "PREFIX is not set\n"
-# fs_basepath, fs_homepath and fs_game.
+# fs_basepath, fs_overpath, fs_homepath and fs_game.
true ${COMMON:="$PREFIX/common"}
+true ${OVER_PREFIX:="$PREFIX/over@"}
true ${HOME_PREFIX:="$PREFIX/home@"}
true ${FS_GAME:="slacker"}
@@ -72,15 +73,18 @@ fi
# Figure out all the instance-specific paths.
I="$1"
TREMDED="$TREMDED_PREFIX$I"
+OVER="$OVER_PREFIX$I"
HOME="$HOME_PREFIX$I"
CONFIG_COMMON="$CONFIG_PREFIX/common.cfg"
CONFIG_INST="$CONFIG_PREFIX/$I.cfg"
# Do some integrity checks.
-check_file "$TREMDED" "the tremded"
-check_dir "$HOME" "the home directory"
-check_file "$CONFIG_COMMON" "the common config"
-check_file "$CONFIG_INST" "the instance-specific config"
+check_file "$TREMDED" "the tremded"
+check_dir "$OVER" "the over directory"
+check_file "$OVER/$FS_GAME/game.so" "the game.so"
+check_dir "$HOME" "the home directory"
+check_file "$CONFIG_COMMON" "the common config"
+check_file "$CONFIG_INST" "the instance-specific config"
# Server configuration is done by overwiting the autogen.
cat "$CONFIG_COMMON" "$CONFIG_INST" > "$HOME/$FS_GAME/autogen_server.cfg" \
@@ -90,6 +94,7 @@ cat "$CONFIG_COMMON" "$CONFIG_INST" > "$HOME/$FS_GAME/autogen_server.cfg" \
cd "$HOME" || error "cannot chdir to %s\n" "$HOME"
"$GDB_WRAPPER" "$TREMDED" \
+set fs_basepath "$COMMON" \
+ +set fs_overpath "$OVER" \
+set fs_homepath "$HOME" \
+set fs_game "$FS_GAME" \
+set com_pipefile "pipe" \