From ebdd12a60dfdb8db6976762653764f6b2533d9c9 Mon Sep 17 00:00:00 2001 From: Nick White Date: Fri, 1 May 2009 10:11:25 +0100 Subject: Add a few more anti-clobbering protections --- auto-installer.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'auto-installer.sh') 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 -- cgit v1.2.3