summaryrefslogtreecommitdiff
path: root/auto-installer.sh
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2009-05-01 10:11:25 +0100
committerNick White <git@njw.me.uk>2009-05-01 10:11:25 +0100
commitebdd12a60dfdb8db6976762653764f6b2533d9c9 (patch)
tree6e31272b9f85f91dc092f4776c4a50c7e5756275 /auto-installer.sh
parenta6055bfb9b9847021ab93cddfdc31357b2c7fc38 (diff)
downloadgemrb-gameinstallers-ebdd12a60dfdb8db6976762653764f6b2533d9c9.tar.bz2
gemrb-gameinstallers-ebdd12a60dfdb8db6976762653764f6b2533d9c9.zip
Add a few more anti-clobbering protections
Diffstat (limited to 'auto-installer.sh')
-rwxr-xr-xauto-installer.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/auto-installer.sh b/auto-installer.sh
index 655bbaa..b3ec696 100755
--- a/auto-installer.sh
+++ b/auto-installer.sh
@@ -89,6 +89,9 @@ done
[ -z "$TARGETDIR" ] && [ -n "$SHORTGAMENAME" ] && export TARGETDIR="$PWD/$SHORTGAMENAME"
[ -z "$TARGETDIR" ] && diequietly
+# if targetdir already exists, make sure we never clobber it
+[ -d "$TARGETDIR" ] && export alwaysdiesafely=1
+
echo "$FULLGAMENAME detected, installing"
"$scriptdir/$MINSCRIPT" -i "$TARGETDIR" -c "$CDMOUNT" 1>/dev/null || diequietly