summarylogtreecommitdiffstats
path: root/giana.sh
diff options
context:
space:
mode:
authorCarsten Teibes2014-08-28 12:40:15 +0200
committerCarsten Teibes2014-08-28 12:40:15 +0200
commit7ffb30db938780eb6fadd885d4653c8b86820dbd (patch)
tree82b2696a3cfb5417933eaca6abd8401f763b4a45 /giana.sh
parentdff8855f4f2e71e2cd898c2ed53deb3637d4e5bf (diff)
downloadaur-7ffb30db938780eb6fadd885d4653c8b86820dbd.tar.gz
[fix] Data is saved in the home directory now, cleanup
Diffstat (limited to 'giana.sh')
-rw-r--r--giana.sh20
1 files changed, 11 insertions, 9 deletions
diff --git a/giana.sh b/giana.sh
index fd636ae5d7e7..d17668e67b62 100644
--- a/giana.sh
+++ b/giana.sh
@@ -1,18 +1,20 @@
-#!/bin/bash
+#!/bin/sh
#
-# simple launcher by carstene1ns 2013
+# launcher for retroguru games by carstene1ns 2013-2014
#
# get game from script name
-game=${0##*/}
+game=`basename $0`
-# change to game dir
-cd /opt/$game
+# create jail folder
+mkdir -p "$HOME"/.$game
-# launch
-./$game "$@"
+# link data folder, if needed
+if [ ! -L "$HOME"/.$game/data ]; then
+ ln -s /usr/share/$game/data "$HOME"/.$game/data
+fi
-# change back to original dir
-cd - &>/dev/null
+# change to game dir and launch
+cd "$HOME"/.$game && exec /usr/lib/$game/$game "$@"
# eof