summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-action/armagetronad/files/armagetronad-ded')
-rw-r--r--games-action/armagetronad/files/armagetronad-ded50
1 files changed, 50 insertions, 0 deletions
diff --git a/games-action/armagetronad/files/armagetronad-ded b/games-action/armagetronad/files/armagetronad-ded
new file mode 100644
index 000000000000..2f3c44763a6c
--- /dev/null
+++ b/games-action/armagetronad/files/armagetronad-ded
@@ -0,0 +1,50 @@
+#!/bin/bash
+#
+# starts Armagetron Advanced Dedicated Server from the installation directory
+
+ GAME_CONFDIR=/etc/games/armagetronad-ded
+ GAME_LIBDIR=/usr/games/lib/armagetronad-ded
+ GAME_DATADIR=/usr/share/games/armagetronad-ded
+ USER_DATADIR=/etc/games/armagetronad-ded
+ CONFIGDIR=/etc/games/armagetronad-ded
+
+ NO=$'\x1b[0;0m'
+ RD=$'\x1b[31;01m'
+ GR=$'\x1b[32;01m'
+ YL=$'\x1b[33;01m'
+
+ echo "${GR} *${NO} Checking Configuration."
+ if test ! -r $HOME/.armagetronad-ded ; then
+ mkdir $HOME/.armagetronad-ded
+
+ if test -r $HOME/.ArmageTronrc ; then
+ echo "${YL} *${NO} Migrating very old configuration."
+ cp $HOME/.ArmageTronrc $HOME/.armagetronad-ded/user.cfg
+ fi
+fi
+ if test ! -r $HOME/.armagetronad-ded/var ; then
+ files=$( ls $HOME/.armagetronad-ded )
+ mkdir $HOME/.armagetronad-ded/var
+ echo "${GR} *${NO} Testing configuration."
+ test "$files" != "" && mv $files $HOME/.armagetronad-ded/var
+ fi
+
+ echo "${GR} *${NO} Done."
+
+
+ if test "x$1" = "x-h" ; then
+ echo "${RD} *${NO} Please uninstall Armagetron Advanced via Portage."
+fi
+
+ if test "x$1" = "x--uninstall" ; then
+ echo "${RD} *${NO} Please uninstall Armagetron Advanced via Portage."
+ else
+
+ while true; do
+
+ $GAME_LIBDIR/armagetronad-dedicated \
+ --datadir $GAME_DATADIR \
+ --configdir $GAME_CONFDIR \
+ --userdatadir $HOME/.armagetronad-ded
+done
+fi \ No newline at end of file