summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/cd-list.sh8
-rw-r--r--includes/generic-includes.sh13
2 files changed, 12 insertions, 9 deletions
diff --git a/includes/cd-list.sh b/includes/cd-list.sh
index ce1d8e5..83584bd 100644
--- a/includes/cd-list.sh
+++ b/includes/cd-list.sh
@@ -52,9 +52,11 @@ function get_game
MINSCRIPT="bg2/install-soa-4cd-us-minimal.sh"
EXTRASCRIPT="bg2/install-soa-4cd-us-extra.sh"
EXPANSIONSCRIPT="bg2/install-soa-4cd-us-tobMinimal.sh"
+ EXPANSIONNAME="Throne of Bhaal"
PATCHES="" # TODO: fill in patches
# bg2/install-patch-soa-us.sh bg2/install-patch-baldurdash-fix.sh bg2/install-patch-soa-baldurdash-text.sh"
WINDOWSFILES="bgdxtest.exe bggltest.exe glsetup.exe bgconfig.exe bgmain.exe charview.exe"
+ CDNO=4
;;
$BG2_TOB_1CD_US_MD5 )
FULLGAMENAME="Baldurs Gate 2 - Throne of Bhaal: 1CD US version"
@@ -102,13 +104,13 @@ function get_game
CDNO=2
;;
* )
- echo "Unrecognised CD - please select game from menu"
+ echo "Unrecognised CD - please select game from menu or change the disc in ${CDMOUNT}"
choosegame
;;
esac
done
- export FULLGAMENAME SHORTGAMENAME MINSCRIPT EXTRASCRIPT EXPANSIONSCRIPT PATCHES WINDOWSFILES CDNO
+ export FULLGAMENAME SHORTGAMENAME MINSCRIPT EXTRASCRIPT EXPANSIONSCRIPT EXPANSIONNAME PATCHES WINDOWSFILES CDNO
}
function choosegame
@@ -126,9 +128,7 @@ function choosegame
echo "7 | Planescape: Torment (4CD version)"
echo "8 | Icewind Dale (2CD UK version)"
echo "9 | Icewind Dale 2 (2CD International version)"
- echo
echo "Z | My game isn't listed."
- echo
echo "Q | Quit"
read -n 1 choice
diff --git a/includes/generic-includes.sh b/includes/generic-includes.sh
index 1ed5472..3e3ef36 100644
--- a/includes/generic-includes.sh
+++ b/includes/generic-includes.sh
@@ -143,7 +143,7 @@ function copylower
# usage: copylower source destination
if [ -d "$1" ]; then
for filename in $(find "$1" -type f); do
- lowerpath="$(echo $filename|gawk -F "$1" '{print $2}'|tr A-Z a-z)"
+ lowerpath="$(echo $filename|gawk -F '$1' '{print $2}'|tr A-Z a-z)"
cp -f "$filename" "$2/$lowerpath" || die
done
elif [ -f "$1" ]; then
@@ -158,7 +158,7 @@ function setlower
if [ "$1" ]
then
cd "$1"
- for each_file in "`find ./ -iname "*"`"
+ for each_file in `find ./ -iname "*"`
do
lower="`echo "$each_file" | tr "[:upper:]" "[:lower:]"`"
@@ -174,9 +174,12 @@ function move_and_remove
{
# usage: move_and_remove source destination
# copies the files in the source directory to the destination.
- mkdir -p "$2" || die
- cp -R "$1/"* "$2" || die
- rm -r "$1"
+ if [ "$1" != "$2" ]
+ then
+ mkdir -p "$2" || die
+ cp -R "$1/"* "$2" || die
+ rm -r "$1"
+ fi
}
function teardown