diff options
author | Nick White <git@njw.me.uk> | 2009-05-01 09:40:15 +0100 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2009-05-01 09:40:15 +0100 |
commit | a6055bfb9b9847021ab93cddfdc31357b2c7fc38 (patch) | |
tree | 95637bd21e57fb62d5f99e5eaf8e6a0341070869 /auto-installer.sh | |
parent | a6a068beefb220971dc2bfdd75c4bb202d3819cf (diff) | |
download | gemrb-gameinstallers-a6055bfb9b9847021ab93cddfdc31357b2c7fc38.tar.bz2 gemrb-gameinstallers-a6055bfb9b9847021ab93cddfdc31357b2c7fc38.zip |
Fixed targetdir setting (thanks Nick Daly)
Fixed a problem with setting targetdir which could result in the current
directory being deleted.
Diffstat (limited to 'auto-installer.sh')
-rwxr-xr-x | auto-installer.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/auto-installer.sh b/auto-installer.sh index 1fcdbc3..655bbaa 100755 --- a/auto-installer.sh +++ b/auto-installer.sh @@ -86,6 +86,9 @@ while [ -z "$MINSCRIPT" ]; do esac done +[ -z "$TARGETDIR" ] && [ -n "$SHORTGAMENAME" ] && export TARGETDIR="$PWD/$SHORTGAMENAME" +[ -z "$TARGETDIR" ] && diequietly + echo "$FULLGAMENAME detected, installing" "$scriptdir/$MINSCRIPT" -i "$TARGETDIR" -c "$CDMOUNT" 1>/dev/null || diequietly |