diff options
Diffstat (limited to 'includes/autoinstall-includes.sh')
-rw-r--r-- | includes/autoinstall-includes.sh | 13 |
1 files changed, 8 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 } |