From 962f28c581d17237b1a85b4c7771877d8c35a98a Mon Sep 17 00:00:00 2001 From: Nick Daly Date: Sun, 7 Jun 2009 21:17:32 -0500 Subject: Corrected recommendcfg for games that require "cd#" directories. --- includes/autoinstall-includes.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/autoinstall-includes.sh b/includes/autoinstall-includes.sh index 933e731..1e9c95d 100644 --- a/includes/autoinstall-includes.sh +++ b/includes/autoinstall-includes.sh @@ -43,7 +43,7 @@ function recommendcfg # usage: recommendcfg [numofcds] if [ "$1" ]; then - NUMOFCDS=$1 + NUMOFCDS="$1" else NUMOFCDS=1 fi @@ -55,7 +55,11 @@ function recommendcfg LINE="GamePath=$TARGETDIR"; echo $LINE if [ $FULLINSTALL -eq 1 ]; then for CDNUMBER in $(seq $NUMOFCDS); do - LINE="CD$CDNUMBER=$TARGETDIR" + if [ -d "${TARGETDIR}/cd${CDNUMBER}" ]; then + LINE="CD${CDNUMBER}=${TARGETDIR}/cd${CDNUMBER}" + else + LINE="CD$CDNUMBER=$TARGETDIR" + fi echo $LINE done echo "GameOnCD=0" -- cgit v1.2.3