summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xauto-installer.sh3
-rw-r--r--includes/generic-includes.sh2
2 files changed, 4 insertions, 1 deletions
diff --git a/auto-installer.sh b/auto-installer.sh
index d79f8af..4295230 100755
--- a/auto-installer.sh
+++ b/auto-installer.sh
@@ -68,6 +68,9 @@ case "$CDMD5" in
;;
esac
+[ -z "$TARGETDIR" ] && [ -n "$SHORTGAMENAME" ] && export TARGETDIR="$PWD/$SHORTGAMENAME"
+[ -z "$TARGETDIR" ] && diequietly
+
echo "$FULLGAMENAME detected, installing"
$MINSCRIPT -i "$TARGETDIR" -c "$CDMOUNT" 1>/dev/null || diequietly
diff --git a/includes/generic-includes.sh b/includes/generic-includes.sh
index e14138f..d4dcdb4 100644
--- a/includes/generic-includes.sh
+++ b/includes/generic-includes.sh
@@ -2,7 +2,7 @@
[ -z "$TMPDIR" ] && export TMPDIR="/tmp/iepatch"
-[ -z "$TARGETDIR" ] && export TARGETDIR="$PWD/$SHORTGAMENAME"
+[ -z "$TARGETDIR" ] && [ -e "$SHORTGAMENAME" ] && export TARGETDIR="$PWD/$SHORTGAMENAME"
[ -z "$LANGUAGE" ] && export LANGUAGE="English"