summaryrefslogtreecommitdiff
path: root/games/cosmic_assault/cosmic_assault.sh
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2017-04-11 01:16:57 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-04-13 07:27:51 +0700
commit00c5eb688cb1a243bed90fd54bce33f5204f1f97 (patch)
treec8cfe54a861ce836107c20e2fc2f34fb5d857822 /games/cosmic_assault/cosmic_assault.sh
parent971d9e6fb580c3de9e90d19da2f76bbe151d97fd (diff)
downloadslackbuilds-00c5eb688cb1a243bed90fd54bce33f5204f1f97.tar.gz
games/cosmic_assault: Added (retro 2D space shooter game).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'games/cosmic_assault/cosmic_assault.sh')
-rw-r--r--games/cosmic_assault/cosmic_assault.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/games/cosmic_assault/cosmic_assault.sh b/games/cosmic_assault/cosmic_assault.sh
new file mode 100644
index 0000000000..4c98b90d7b
--- /dev/null
+++ b/games/cosmic_assault/cosmic_assault.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# shell script wrapper for cosmic_assault, written by B. Watson
+# for SlackBuilds.org, licensed under the WTFPL.
+
+# this script is necessary because the game only looks in the current
+# directory for its data/ directory, which must also be writable due to
+# it writing the high score save file there (with no error checking!)
+
+PRGNAM=cosmic_assault
+SHAREDIR=/usr/share/games/$PRGNAM
+HOMEDIR=$HOME/.$PRGNAM
+
+set -e
+mkdir -p $HOMEDIR
+cd $HOMEDIR
+[ ! -e data ] && ln -s $SHAREDIR/data data
+exec $SHAREDIR/$PRGNAM.py