From 920ac6e2414eb1840104100545958d857446f296 Mon Sep 17 00:00:00 2001 From: Nick White Date: Sun, 16 Aug 2009 03:08:37 +0100 Subject: Fixed variable typo and improved config recommends Fixed typo of STARTCD which led to undefined results. Only recommend to use the GameOnCD config variable if we know if it would be useful or not. --- includes/autoinstall-includes.sh | 13 ++++++++----- includes/cd-list.sh | 2 ++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/includes/autoinstall-includes.sh b/includes/autoinstall-includes.sh index 0cd3754..9462c80 100644 --- a/includes/autoinstall-includes.sh +++ b/includes/autoinstall-includes.sh @@ -40,7 +40,7 @@ function query function recommendcfg { - # usage: recommendcfg [numofcds] [startCd] + # usage: recommendcfg [numofcds] [startcd] if [ "$1" ]; then NUMOFCDS="$1" @@ -60,7 +60,7 @@ function recommendcfg echo LINE="GamePath=$TARGETDIR"; echo $LINE if [ $FULLINSTALL -eq 1 ]; then - for CDNUMBER in $(seq $startCd $(($NUMOFCDS+$startCd-1))); do + for CDNUMBER in $(seq $STARTCD $(($NUMOFCDS+$STARTCD-1))); do if [ -d "${TARGETDIR}/cd${CDNUMBER}" ]; then LINE="CD${CDNUMBER}=${TARGETDIR}/cd${CDNUMBER}" else @@ -68,12 +68,15 @@ function recommendcfg fi echo $LINE done - echo "GameOnCD=0" else - for CDNUMBER in $(seq $startCd $(($NUMOFCDS+$startCd-1))); do + for CDNUMBER in $(seq $STARTCD $(($NUMOFCDS+$STARTCD-1))); do LINE="CD$CDNUMBER=$CDMOUNT/cd$CDNUMBER" echo $LINE done - echo "GameOnCD=1" + fi + + # if startcd exists we can't tell if GameOnCD should be recommended + if [ $STARTCD -eq 1 ] ; then + [ $FULLINSTALL -eq 1 ] && echo "GameOnCD=0" || echo "GameOnCD=1" fi } diff --git a/includes/cd-list.sh b/includes/cd-list.sh index 84465b5..8acf905 100644 --- a/includes/cd-list.sh +++ b/includes/cd-list.sh @@ -45,6 +45,8 @@ function get_game MINSCRIPT="bg1/install-1cd-totsc-uk.sh" PATCHES="bg1/install-patch-totsc-uk.sh bg1/install-patch-baldurdash-fix.sh bg1/install-patch-totsc-baldurdash-text.sh" WINDOWSFILES="bgmain2.exe baldur.exe config.exe mconvert.exe" + CDNO=1 + CDSTART=6 ;; $BG2_4CD_US_MD5 ) FULLGAMENAME="Baldurs Gate 2 - Shadows of Amn: 4CD US version" -- cgit v1.2.3