From 0cb10447fe55fb47f514df90a8b62076cb227343 Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 13 Apr 2009 13:11:22 +0100 Subject: Version control complete --- TODO | 2 -- 1 file changed, 2 deletions(-) diff --git a/TODO b/TODO index 108b3ec..4869197 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,5 @@ Add option to manually choose game version from list -Version control - email qwinn, thank, and suggest offering zipped pkgs & maybe direct link to latest Ask on the forum about splitting to two cfg files, eg gemrb.cfg & bg1.cfg, listing utility & rationale (particularly gemrb install details should be separate from game install details). Offer to code it -- cgit v1.2.3 From 820c8592b643a6069de927605a769f938d4aa54e Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 15 Apr 2009 12:03:20 +0100 Subject: Asked about repackaging pst mods --- TODO | 2 -- 1 file changed, 2 deletions(-) diff --git a/TODO b/TODO index 4869197..07730a7 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,4 @@ Add option to manually choose game version from list -email qwinn, thank, and suggest offering zipped pkgs & maybe direct link to latest - Ask on the forum about splitting to two cfg files, eg gemrb.cfg & bg1.cfg, listing utility & rationale (particularly gemrb install details should be separate from game install details). Offer to code it best would be to read system / user (/etc|.gemrb)/gemrb.cfg, plus .gemrb/gamename.cfg -- cgit v1.2.3 From 2884c41158a7297398386811cd6703c2171b66a1 Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 15 Apr 2009 12:33:30 +0100 Subject: Enabled getpatch to specify outfile --- includes/patch-includes.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/patch-includes.sh b/includes/patch-includes.sh index 0f76409..c09cb81 100644 --- a/includes/patch-includes.sh +++ b/includes/patch-includes.sh @@ -7,7 +7,11 @@ function getpatch { url=$1 - filename=$(basename $url) + if [ $# -gt 1 ]; then + filename="$2" + else + filename=$(basename $url) + fi if [ -f "$PATCHDIR/$filename" ]; then cp "$PATCHDIR/$filename" $TMPDIR || die -- cgit v1.2.3 From d8222611d868e4ba7e23285f0ea0d74093226292 Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 15 Apr 2009 12:34:18 +0100 Subject: Use direct download links for extra pst patches --- pst/install-patch-fixpack.sh | 6 +----- pst/install-patch-tweaks.sh | 6 +----- pst/install-patch-ub.sh | 6 +----- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/pst/install-patch-fixpack.sh b/pst/install-patch-fixpack.sh index 6630023..5f9fdca 100755 --- a/pst/install-patch-fixpack.sh +++ b/pst/install-patch-fixpack.sh @@ -11,11 +11,7 @@ checkforbin WeiDU unrar setuptmp -if [ ! -f "$PATCHDIR/pstfixpack.rar" ]; then - echo "You need to download the fixpack from http://dl.spellholdstudios.net/pst-fixpack" 1>&2 - echo "and put it in $PATCHDIR to install this patch" 1>&2 - exit -fi +getpatch "http://www.shsforums.net/index.php?automodule=downloads&req=download&code=confirm_download&id=647" pstfixpack.rar unrar x -o+ -cl "$PATCHDIR/pstfixpack.rar" "$TARGETDIR" || die rm "$TARGETDIR/setup-pst-fix.exe" diff --git a/pst/install-patch-tweaks.sh b/pst/install-patch-tweaks.sh index a90ee40..5539666 100755 --- a/pst/install-patch-tweaks.sh +++ b/pst/install-patch-tweaks.sh @@ -13,11 +13,7 @@ checkforbin WeiDU unrar setuptmp -if [ ! -f "$PATCHDIR/psttweak.rar" ]; then - echo "You need to download the fixpack from http://dl.spellholdstudios.net/pst-qtweaks" 1>&2 - echo "and put it in $PATCHDIR to install this patch" 1>&2 - exit -fi +getpatch "http://www.shsforums.net/index.php?automodule=downloads&req=download&code=confirm_download&id=649" psttweak.rar unrar x -o+ -cl "$PATCHDIR/psttweak.rar" "$TARGETDIR" || die rm "$TARGETDIR/setup-pst-tweak.exe" diff --git a/pst/install-patch-ub.sh b/pst/install-patch-ub.sh index b26a66c..c676589 100755 --- a/pst/install-patch-ub.sh +++ b/pst/install-patch-ub.sh @@ -11,11 +11,7 @@ checkforbin WeiDU unrar setuptmp -if [ ! -f "$PATCHDIR/pstub.rar" ]; then - echo "You need to download the fixpack from http://dl.spellholdstudios.net/pst-ub" 1>&2 - echo "and put it in $PATCHDIR to install this patch" 1>&2 - exit -fi +getpatch "http://www.shsforums.net/index.php?automodule=downloads&req=download&code=confirm_download&id=648" pstub.rar unrar x -o+ -cl "$PATCHDIR/pstub.rar" "$TARGETDIR" || die rm "$TARGETDIR/setup-pst-ub.exe" -- cgit v1.2.3 From a86984984f21b70bcdb835fe9625b7eeda029cb8 Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 15 Apr 2009 12:36:37 +0100 Subject: Add info on unrar version required --- pst/install-patch-fixpack.sh | 2 ++ pst/install-patch-tweaks.sh | 2 ++ pst/install-patch-ub.sh | 2 ++ 3 files changed, 6 insertions(+) diff --git a/pst/install-patch-fixpack.sh b/pst/install-patch-fixpack.sh index 5f9fdca..c65a7ca 100755 --- a/pst/install-patch-fixpack.sh +++ b/pst/install-patch-fixpack.sh @@ -1,5 +1,7 @@ #!/bin/bash # Planescape: Torment Ultimate Weidu Fixpack +# Note: This requires the freeware version of unrar, available +# from http://www.rarlab.com/rar_add.htm scriptdir="$(dirname $0)"/.. source "$scriptdir/includes/generic-includes.sh" diff --git a/pst/install-patch-tweaks.sh b/pst/install-patch-tweaks.sh index 5539666..6886aef 100755 --- a/pst/install-patch-tweaks.sh +++ b/pst/install-patch-tweaks.sh @@ -2,6 +2,8 @@ # Planescape: Torment Tweak Pack # Note: this only installs the Banter Accelerator # and Stackable Items tweaks +# Note: This requires the freeware version of unrar, available +# from http://www.rarlab.com/rar_add.htm scriptdir="$(dirname $0)"/.. source "$scriptdir/includes/generic-includes.sh" diff --git a/pst/install-patch-ub.sh b/pst/install-patch-ub.sh index c676589..af724ab 100755 --- a/pst/install-patch-ub.sh +++ b/pst/install-patch-ub.sh @@ -1,5 +1,7 @@ #!/bin/bash # Planescape: Torment Unfinished Business +# Note: This requires the freeware version of unrar, available +# from http://www.rarlab.com/rar_add.htm scriptdir="$(dirname $0)"/.. source "$scriptdir/includes/generic-includes.sh" -- cgit v1.2.3 From ff32e8c62cbc00c30849dbbaa275bad72fe98e5e Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 15 Apr 2009 15:00:42 +0100 Subject: Removed obsolete totsc autoinstaller --- totsc/auto-totsc-installer.sh | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100755 totsc/auto-totsc-installer.sh diff --git a/totsc/auto-totsc-installer.sh b/totsc/auto-totsc-installer.sh deleted file mode 100755 index f82114a..0000000 --- a/totsc/auto-totsc-installer.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -source ../includes/generic-includes.sh -source ../cd-includes.sh -source ../patch-includes.sh -source ../autoinstall-includes.sh - -parseargs "$@" - -echo "Checking CD version" -CDMD5=$(md5sum $CDMOUNT/data1.cab|awk '{print $1}') - -case "$CDMD5" in - "e27d259ddc0171ff945dbba136e60309" ) - FULLGAMENAME="Baldurs Gate Tales of the Sword Coast: 1CD UK version" - INSTALLSCRIPT=./install-totsc-1cd-uk.sh - OFFICIALPATCH=./install-totsc-patch-uk.sh - ;; - * ) - echo "Unrecognised CD - please select Baldurs Gate version from menu" - # TODO: Add menu to show and select all known BG1 versions - exit 1 - ;; -esac - -echo "$FULLGAMENAME detected, installing" -$INSTALLSCRIPT -i "$TARGETDIR" -c "$CDMOUNT" 1>/dev/null || diequietly -if query "Do you want to install the official patch?" y; then - $OFFICIALPATCH -i "$TARGETDIR" -p "$PATCHDIR" 1>/dev/null || diequietly -fi -if query "Do you want to install the baldurdash fixes?" y; then - ./install-totsc-patch-baldurdash-fix.sh -i "$TARGETDIR" -p "$PATCHDIR" 1>/dev/null || diequietly - if [ "$LANGUAGE" = "English" ]; then - ./install-totsc-patch-baldurdash-text.sh -i "$TARGETDIR" -p "$PATCHDIR" 1>/dev/null || diequietly - fi -fi -if query "Do you want to remove unneeded windows files?" n; then - rm -f "$TARGETDIR"/*.exe - rm -f "$TARGETDIR"/*.url - rm -f "$TARGETDIR"/luaauto.cfg -fi -echo -echo "$FULLGAMENAME installed successfully" -- cgit v1.2.3 From 2ad9080137306430df3ed33a8ebc3e26d902269e Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 15 Apr 2009 15:02:53 +0100 Subject: Remove tweak which required exe patching --- pst/install-patch-tweaks.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pst/install-patch-tweaks.sh b/pst/install-patch-tweaks.sh index 6886aef..be25e2d 100755 --- a/pst/install-patch-tweaks.sh +++ b/pst/install-patch-tweaks.sh @@ -1,7 +1,6 @@ #!/bin/bash -# Planescape: Torment Tweak Pack -# Note: this only installs the Banter Accelerator -# and Stackable Items tweaks +# Planescape: Torment Tweaks +# Note: this only installs the Stackable Items and Save Nordom tweaks # Note: This requires the freeware version of unrar, available # from http://www.rarlab.com/rar_add.htm @@ -29,7 +28,7 @@ case "$LANGUAGE" in esac # echo to install all manually as --yes assumes English -echo -e "${langno}\nn\n2\nn\nn\ni\nn\ni\nn\nn\nn\nn\nn\nn\nn\nn\nn\n" \ +echo -e "${langno}\nn\nn\nn\nn\ni\nn\ni\nn\nn\nn\nn\nn\nn\nn\nn\nn\n" \ | WeiDU --continue setup-pst-tweak.tp2 || die setperms "$TARGETDIR" -- cgit v1.2.3 From be2066c426699d84ce2b40749df6d218ee90f81f Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 15 Apr 2009 15:35:59 +0100 Subject: Added license notice to all files --- auto-installer.sh | 18 ++++++++++++++++-- bg1/install-3cd-extra.sh | 15 +++++++++++++++ bg1/install-3cd-minimal.sh | 15 +++++++++++++++ bg1/install-5cd-extra.sh | 15 +++++++++++++++ bg1/install-5cd-minimal.sh | 15 +++++++++++++++ bg1/install-patch-baldurdash-fix.sh | 15 +++++++++++++++ bg1/install-patch-baldurdash-text.sh | 15 +++++++++++++++ bg1/install-patch-intl.sh | 15 +++++++++++++++ bg1/install-patch-us.sh | 15 +++++++++++++++ includes/autoinstall-includes.sh | 15 +++++++++++++++ includes/cd-includes.sh | 15 +++++++++++++++ includes/generic-includes.sh | 15 +++++++++++++++ includes/patch-includes.sh | 15 +++++++++++++++ pst/install-2cd-extra.sh | 15 +++++++++++++++ pst/install-2cd-minimal.sh | 15 +++++++++++++++ pst/install-4cd-extra.sh | 15 +++++++++++++++ pst/install-4cd-minimal.sh | 15 +++++++++++++++ pst/install-patch-fixpack.sh | 15 +++++++++++++++ pst/install-patch-official.sh | 15 +++++++++++++++ pst/install-patch-tweaks.sh | 15 +++++++++++++++ pst/install-patch-ub.sh | 15 +++++++++++++++ totsc/install-1cd-uk.sh | 15 +++++++++++++++ totsc/install-patch-baldurdash-fix.sh | 15 +++++++++++++++ totsc/install-patch-baldurdash-text.sh | 15 +++++++++++++++ totsc/install-patch-intl.sh | 15 +++++++++++++++ totsc/install-patch-uk.sh | 15 +++++++++++++++ totsc/install-patch-us.sh | 15 +++++++++++++++ 27 files changed, 406 insertions(+), 2 deletions(-) diff --git a/auto-installer.sh b/auto-installer.sh index d79f8af..62ac13d 100755 --- a/auto-installer.sh +++ b/auto-installer.sh @@ -1,4 +1,18 @@ #!/bin/sh +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. FULLGAMENAME='' MINSCRIPT='' @@ -83,8 +97,8 @@ fi if [ -n "$PATCHES" ]; then for patch in $PATCHES; do - # grab 2nd line from scripts - patchtitle=$(sed -n 2p $patch|cut -d ' ' -f 2-) + # grab 17th line from scripts (description line; after license) + patchtitle=$(sed -n 17p $patch|cut -d ' ' -f 2-) if query "Do you want to install $patchtitle" y; then $patch \ -i "$TARGETDIR" \ diff --git a/bg1/install-3cd-extra.sh b/bg1/install-3cd-extra.sh index a5d1b8e..b7604f5 100755 --- a/bg1/install-3cd-extra.sh +++ b/bg1/install-3cd-extra.sh @@ -1,4 +1,19 @@ #!/bin/bash +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # Extra Baldur's Gate content (so CDs aren't needed) scriptdir="$(dirname $0)"/.. diff --git a/bg1/install-3cd-minimal.sh b/bg1/install-3cd-minimal.sh index 42d3c0d..ac83cfa 100755 --- a/bg1/install-3cd-minimal.sh +++ b/bg1/install-3cd-minimal.sh @@ -1,4 +1,19 @@ #!/bin/sh +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # Baldur's Gate & Tales of the Sword Coast 3CD version minimal scriptdir="$(dirname $0)"/.. diff --git a/bg1/install-5cd-extra.sh b/bg1/install-5cd-extra.sh index 445b36c..b97f052 100755 --- a/bg1/install-5cd-extra.sh +++ b/bg1/install-5cd-extra.sh @@ -1,4 +1,19 @@ #!/bin/bash +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # Installs all extra Baldur's Gate content (so CDs aren't needed) scriptdir="$(dirname $0)"/.. diff --git a/bg1/install-5cd-minimal.sh b/bg1/install-5cd-minimal.sh index 3db68d0..af5aa7f 100755 --- a/bg1/install-5cd-minimal.sh +++ b/bg1/install-5cd-minimal.sh @@ -1,4 +1,19 @@ #!/bin/sh +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # Baldur's Gate 5CD International version minimal scriptdir="$(dirname $0)"/.. diff --git a/bg1/install-patch-baldurdash-fix.sh b/bg1/install-patch-baldurdash-fix.sh index 939d4f6..ef00260 100755 --- a/bg1/install-patch-baldurdash-fix.sh +++ b/bg1/install-patch-baldurdash-fix.sh @@ -1,4 +1,19 @@ #!/bin/bash +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # BG1/TOTSC Baldurdash fix pack scriptdir="$(dirname $0)"/.. diff --git a/bg1/install-patch-baldurdash-text.sh b/bg1/install-patch-baldurdash-text.sh index 266c4ee..bab642d 100755 --- a/bg1/install-patch-baldurdash-text.sh +++ b/bg1/install-patch-baldurdash-text.sh @@ -1,4 +1,19 @@ #!/bin/bash +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # BG1 Baldurdash text pack scriptdir="$(dirname $0)"/.. diff --git a/bg1/install-patch-intl.sh b/bg1/install-patch-intl.sh index 5126ec7..2c0aceb 100755 --- a/bg1/install-patch-intl.sh +++ b/bg1/install-patch-intl.sh @@ -1,4 +1,19 @@ #!/bin/bash +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # BG1 official international patch scriptdir="$(dirname $0)"/.. diff --git a/bg1/install-patch-us.sh b/bg1/install-patch-us.sh index 3e0d2cb..41a5e71 100755 --- a/bg1/install-patch-us.sh +++ b/bg1/install-patch-us.sh @@ -1,4 +1,19 @@ #!/bin/bash +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # BG1 official US/Canada patch scriptdir="$(dirname $0)"/.. diff --git a/includes/autoinstall-includes.sh b/includes/autoinstall-includes.sh index a3bfa52..05465ba 100644 --- a/includes/autoinstall-includes.sh +++ b/includes/autoinstall-includes.sh @@ -1,3 +1,18 @@ +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. + ### variables ### [ -z "$FULLINSTALL" ] && export FULLINSTALL=1 diff --git a/includes/cd-includes.sh b/includes/cd-includes.sh index e3d00fd..b9c3a3c 100644 --- a/includes/cd-includes.sh +++ b/includes/cd-includes.sh @@ -1,3 +1,18 @@ +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. + ### default variables ### [ -z "$CDMOUNT" ] && export CDMOUNT="/media/cdrom" diff --git a/includes/generic-includes.sh b/includes/generic-includes.sh index e14138f..c441f55 100644 --- a/includes/generic-includes.sh +++ b/includes/generic-includes.sh @@ -1,3 +1,18 @@ +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. + ### default variables ### [ -z "$TMPDIR" ] && export TMPDIR="/tmp/iepatch" diff --git a/includes/patch-includes.sh b/includes/patch-includes.sh index c09cb81..8c06f8f 100644 --- a/includes/patch-includes.sh +++ b/includes/patch-includes.sh @@ -1,3 +1,18 @@ +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. + ### default variables ### [ -z "$PATCHDIR" ] && export PATCHDIR="$PWD" diff --git a/pst/install-2cd-extra.sh b/pst/install-2cd-extra.sh index 6901c10..47922a8 100755 --- a/pst/install-2cd-extra.sh +++ b/pst/install-2cd-extra.sh @@ -1,4 +1,19 @@ #!/bin/sh +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # Installs Planescape Torment 2CD version extras scriptdir="$(dirname $0)"/.. diff --git a/pst/install-2cd-minimal.sh b/pst/install-2cd-minimal.sh index d868b90..0b90703 100755 --- a/pst/install-2cd-minimal.sh +++ b/pst/install-2cd-minimal.sh @@ -1,4 +1,19 @@ #!/bin/sh +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # Installs Planescape Torment 2CD version minimal FULLGAMENAME="Planescape Torment: 2CD version" diff --git a/pst/install-4cd-extra.sh b/pst/install-4cd-extra.sh index 064edb4..64e1a66 100755 --- a/pst/install-4cd-extra.sh +++ b/pst/install-4cd-extra.sh @@ -1,4 +1,19 @@ #!/bin/sh +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # Installs Planescape Torment 4CD version extras scriptdir="$(dirname $0)"/.. diff --git a/pst/install-4cd-minimal.sh b/pst/install-4cd-minimal.sh index 5ffb88b..4680949 100755 --- a/pst/install-4cd-minimal.sh +++ b/pst/install-4cd-minimal.sh @@ -1,4 +1,19 @@ #!/bin/sh +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # Installs Planescape Torment 4CD version minimal FULLGAMENAME="Planescape Torment: 4CD version" diff --git a/pst/install-patch-fixpack.sh b/pst/install-patch-fixpack.sh index c65a7ca..acd5207 100755 --- a/pst/install-patch-fixpack.sh +++ b/pst/install-patch-fixpack.sh @@ -1,4 +1,19 @@ #!/bin/bash +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # Planescape: Torment Ultimate Weidu Fixpack # Note: This requires the freeware version of unrar, available # from http://www.rarlab.com/rar_add.htm diff --git a/pst/install-patch-official.sh b/pst/install-patch-official.sh index 485fad1..4438bcd 100755 --- a/pst/install-patch-official.sh +++ b/pst/install-patch-official.sh @@ -1,4 +1,19 @@ #!/bin/bash +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # Planescape: Torment official patch scriptdir="$(dirname $0)"/.. diff --git a/pst/install-patch-tweaks.sh b/pst/install-patch-tweaks.sh index be25e2d..74acede 100755 --- a/pst/install-patch-tweaks.sh +++ b/pst/install-patch-tweaks.sh @@ -1,4 +1,19 @@ #!/bin/bash +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # Planescape: Torment Tweaks # Note: this only installs the Stackable Items and Save Nordom tweaks # Note: This requires the freeware version of unrar, available diff --git a/pst/install-patch-ub.sh b/pst/install-patch-ub.sh index af724ab..8f90f44 100755 --- a/pst/install-patch-ub.sh +++ b/pst/install-patch-ub.sh @@ -1,4 +1,19 @@ #!/bin/bash +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # Planescape: Torment Unfinished Business # Note: This requires the freeware version of unrar, available # from http://www.rarlab.com/rar_add.htm diff --git a/totsc/install-1cd-uk.sh b/totsc/install-1cd-uk.sh index d1d2ccb..8051557 100755 --- a/totsc/install-1cd-uk.sh +++ b/totsc/install-1cd-uk.sh @@ -1,4 +1,19 @@ #!/bin/sh +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # Tales of the Sword Coast 1CD version scriptdir="$(dirname $0)"/.. diff --git a/totsc/install-patch-baldurdash-fix.sh b/totsc/install-patch-baldurdash-fix.sh index 939d4f6..ef00260 100755 --- a/totsc/install-patch-baldurdash-fix.sh +++ b/totsc/install-patch-baldurdash-fix.sh @@ -1,4 +1,19 @@ #!/bin/bash +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # BG1/TOTSC Baldurdash fix pack scriptdir="$(dirname $0)"/.. diff --git a/totsc/install-patch-baldurdash-text.sh b/totsc/install-patch-baldurdash-text.sh index 35fba39..af7a861 100755 --- a/totsc/install-patch-baldurdash-text.sh +++ b/totsc/install-patch-baldurdash-text.sh @@ -1,4 +1,19 @@ #!/bin/bash +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # BG1 TOTSC Baldurdash text pack scriptdir="$(dirname $0)"/.. diff --git a/totsc/install-patch-intl.sh b/totsc/install-patch-intl.sh index 4581c9d..1f25619 100755 --- a/totsc/install-patch-intl.sh +++ b/totsc/install-patch-intl.sh @@ -1,4 +1,19 @@ #!/bin/bash +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # BG1 TOTSC official International patch scriptdir="$(dirname $0)"/.. diff --git a/totsc/install-patch-uk.sh b/totsc/install-patch-uk.sh index b7cc2f2..144ac66 100755 --- a/totsc/install-patch-uk.sh +++ b/totsc/install-patch-uk.sh @@ -1,4 +1,19 @@ #!/bin/bash +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # BG1 TOTSC official UK patch scriptdir="$(dirname $0)"/.. diff --git a/totsc/install-patch-us.sh b/totsc/install-patch-us.sh index 1c400d6..ac17078 100755 --- a/totsc/install-patch-us.sh +++ b/totsc/install-patch-us.sh @@ -1,4 +1,19 @@ #!/bin/bash +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# # BG1 TOTSC official US/Canada patch scriptdir="$(dirname $0)"/.. -- cgit v1.2.3 From f668f7acafd2c15fe915f753d7ca9fd5b5f53d43 Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 15 Apr 2009 15:38:07 +0100 Subject: Ensure bash is always used to execute scripts --- auto-installer.sh | 2 +- bg1/install-3cd-minimal.sh | 2 +- bg1/install-5cd-minimal.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/auto-installer.sh b/auto-installer.sh index 62ac13d..a31dbd8 100755 --- a/auto-installer.sh +++ b/auto-installer.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright 2009 Nick White # # This program is free software; you can redistribute it and/or diff --git a/bg1/install-3cd-minimal.sh b/bg1/install-3cd-minimal.sh index ac83cfa..08ff855 100755 --- a/bg1/install-3cd-minimal.sh +++ b/bg1/install-3cd-minimal.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright 2009 Nick White # # This program is free software; you can redistribute it and/or diff --git a/bg1/install-5cd-minimal.sh b/bg1/install-5cd-minimal.sh index af5aa7f..8625427 100755 --- a/bg1/install-5cd-minimal.sh +++ b/bg1/install-5cd-minimal.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Copyright 2009 Nick White # # This program is free software; you can redistribute it and/or -- cgit v1.2.3 From b4287acf7cef82f0215de55fd937670761fdee41 Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 15 Apr 2009 15:53:19 +0100 Subject: Normalised script descriptions --- auto-installer.sh | 3 +++ bg1/install-3cd-extra.sh | 2 +- bg1/install-3cd-minimal.sh | 2 +- bg1/install-5cd-extra.sh | 2 +- bg1/install-5cd-minimal.sh | 2 +- pst/install-2cd-extra.sh | 2 +- pst/install-2cd-minimal.sh | 2 +- pst/install-4cd-extra.sh | 2 +- pst/install-4cd-minimal.sh | 2 +- totsc/install-1cd-uk.sh | 2 +- 10 files changed, 12 insertions(+), 9 deletions(-) diff --git a/auto-installer.sh b/auto-installer.sh index a31dbd8..f8052bd 100755 --- a/auto-installer.sh +++ b/auto-installer.sh @@ -13,6 +13,9 @@ # # See for a copy of the GNU General # Public License. +# +# Runs the appropriate installer(s) for an Infinity Engine game, +# based on the CD inserted FULLGAMENAME='' MINSCRIPT='' diff --git a/bg1/install-3cd-extra.sh b/bg1/install-3cd-extra.sh index b7604f5..31cc5d7 100755 --- a/bg1/install-3cd-extra.sh +++ b/bg1/install-3cd-extra.sh @@ -14,7 +14,7 @@ # See for a copy of the GNU General # Public License. # -# Extra Baldur's Gate content (so CDs aren't needed) +# Extra Baldur's Gate (3CD version) content (so CDs aren't needed) scriptdir="$(dirname $0)"/.. source "$scriptdir/includes/generic-includes.sh" diff --git a/bg1/install-3cd-minimal.sh b/bg1/install-3cd-minimal.sh index 08ff855..09d189b 100755 --- a/bg1/install-3cd-minimal.sh +++ b/bg1/install-3cd-minimal.sh @@ -14,7 +14,7 @@ # See for a copy of the GNU General # Public License. # -# Baldur's Gate & Tales of the Sword Coast 3CD version minimal +# Baldur's Gate & Tales of the Sword Coast (3CD version) minimal scriptdir="$(dirname $0)"/.. source "$scriptdir/includes/generic-includes.sh" diff --git a/bg1/install-5cd-extra.sh b/bg1/install-5cd-extra.sh index b97f052..9e6847d 100755 --- a/bg1/install-5cd-extra.sh +++ b/bg1/install-5cd-extra.sh @@ -14,7 +14,7 @@ # See for a copy of the GNU General # Public License. # -# Installs all extra Baldur's Gate content (so CDs aren't needed) +# Extra Baldur's Gate (5CD International version) content (so CDs aren't needed) scriptdir="$(dirname $0)"/.. source "$scriptdir/includes/generic-includes.sh" diff --git a/bg1/install-5cd-minimal.sh b/bg1/install-5cd-minimal.sh index 8625427..002c5a9 100755 --- a/bg1/install-5cd-minimal.sh +++ b/bg1/install-5cd-minimal.sh @@ -14,7 +14,7 @@ # See for a copy of the GNU General # Public License. # -# Baldur's Gate 5CD International version minimal +# Baldur's Gate (5CD International version) minimal scriptdir="$(dirname $0)"/.. source "$scriptdir/includes/generic-includes.sh" diff --git a/pst/install-2cd-extra.sh b/pst/install-2cd-extra.sh index 47922a8..4fe58a9 100755 --- a/pst/install-2cd-extra.sh +++ b/pst/install-2cd-extra.sh @@ -14,7 +14,7 @@ # See for a copy of the GNU General # Public License. # -# Installs Planescape Torment 2CD version extras +# Extra Planescape: Torment (2CD version) content (so CDs aren't needed) scriptdir="$(dirname $0)"/.. source "$scriptdir/includes/generic-includes.sh" diff --git a/pst/install-2cd-minimal.sh b/pst/install-2cd-minimal.sh index 0b90703..ecc8c8a 100755 --- a/pst/install-2cd-minimal.sh +++ b/pst/install-2cd-minimal.sh @@ -14,7 +14,7 @@ # See for a copy of the GNU General # Public License. # -# Installs Planescape Torment 2CD version minimal +# Planescape: Torment (2CD version) minimal FULLGAMENAME="Planescape Torment: 2CD version" diff --git a/pst/install-4cd-extra.sh b/pst/install-4cd-extra.sh index 64e1a66..02f566e 100755 --- a/pst/install-4cd-extra.sh +++ b/pst/install-4cd-extra.sh @@ -14,7 +14,7 @@ # See for a copy of the GNU General # Public License. # -# Installs Planescape Torment 4CD version extras +# Extra Planescape: Torment (4CD version) content (so CDs aren't needed) scriptdir="$(dirname $0)"/.. source "$scriptdir/includes/generic-includes.sh" diff --git a/pst/install-4cd-minimal.sh b/pst/install-4cd-minimal.sh index 4680949..517b86e 100755 --- a/pst/install-4cd-minimal.sh +++ b/pst/install-4cd-minimal.sh @@ -14,7 +14,7 @@ # See for a copy of the GNU General # Public License. # -# Installs Planescape Torment 4CD version minimal +# Installs Planescape: Torment (4CD version) minimal FULLGAMENAME="Planescape Torment: 4CD version" diff --git a/totsc/install-1cd-uk.sh b/totsc/install-1cd-uk.sh index 8051557..09c4f74 100755 --- a/totsc/install-1cd-uk.sh +++ b/totsc/install-1cd-uk.sh @@ -14,7 +14,7 @@ # See for a copy of the GNU General # Public License. # -# Tales of the Sword Coast 1CD version +# Tales of the Sword Coast (1CD version) scriptdir="$(dirname $0)"/.. source "$scriptdir/includes/generic-includes.sh" -- cgit v1.2.3 From d83fdf1d073e9832625d90237944ffcfba2870e6 Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 15 Apr 2009 18:59:27 +0100 Subject: Submitted patch to improve cfg handling to sf.net --- TODO | 3 --- 1 file changed, 3 deletions(-) diff --git a/TODO b/TODO index 07730a7..4076af8 100644 --- a/TODO +++ b/TODO @@ -1,4 +1 @@ Add option to manually choose game version from list - -Ask on the forum about splitting to two cfg files, eg gemrb.cfg & bg1.cfg, listing utility & rationale (particularly gemrb install details should be separate from game install details). Offer to code it - best would be to read system / user (/etc|.gemrb)/gemrb.cfg, plus .gemrb/gamename.cfg -- cgit v1.2.3 From 3ecf0d63f3ce379f08e3d6aa609a4e73aa1f98b2 Mon Sep 17 00:00:00 2001 From: Nick White Date: Wed, 15 Apr 2009 23:08:30 +0100 Subject: Removed Qwinn's fix/mod packs Turned out to be more trouble than it was worth to integrate these into the install. Best to leave it to intrepid users, at least for now. --- auto-installer.sh | 3 +-- pst/install-patch-fixpack.sh | 48 ------------------------------------------- pst/install-patch-tweaks.sh | 49 -------------------------------------------- pst/install-patch-ub.sh | 48 ------------------------------------------- 4 files changed, 1 insertion(+), 147 deletions(-) delete mode 100755 pst/install-patch-fixpack.sh delete mode 100755 pst/install-patch-tweaks.sh delete mode 100755 pst/install-patch-ub.sh diff --git a/auto-installer.sh b/auto-installer.sh index f8052bd..e7de650 100755 --- a/auto-installer.sh +++ b/auto-installer.sh @@ -65,7 +65,6 @@ case "$CDMD5" in SHORTGAMENAME="pst" MINSCRIPT=pst/install-2cd-minimal.sh EXTRASCRIPT=pst/install-2cd-extra.sh - PATCHES="pst/install-patch-fixpack.sh pst/install-patch-ub.sh pst/install-patch-tweaks.sh" WINDOWSFILES="torment.exe ereg" CDNO=2 ;; @@ -74,7 +73,7 @@ case "$CDMD5" in SHORTGAMENAME="pst" MINSCRIPT=pst/install-4cd-minimal.sh EXTRASCRIPT=pst/install-4cd-extra.sh - PATCHES="pst/install-patch-official.sh pst/install-patch-fixpack.sh pst/install-patch-ub.sh pst/install-patch-tweaks.sh" + PATCHES="pst/install-patch-official.sh" WINDOWSFILES="torment.exe ereg" CDNO=4 ;; diff --git a/pst/install-patch-fixpack.sh b/pst/install-patch-fixpack.sh deleted file mode 100755 index acd5207..0000000 --- a/pst/install-patch-fixpack.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# Copyright 2009 Nick White -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# See for a copy of the GNU General -# Public License. -# -# Planescape: Torment Ultimate Weidu Fixpack -# Note: This requires the freeware version of unrar, available -# from http://www.rarlab.com/rar_add.htm - -scriptdir="$(dirname $0)"/.. -source "$scriptdir/includes/generic-includes.sh" -source "$scriptdir/includes/patch-includes.sh" - -parseargs "$@" - -checkforbin WeiDU unrar - -setuptmp - -getpatch "http://www.shsforums.net/index.php?automodule=downloads&req=download&code=confirm_download&id=647" pstfixpack.rar - -unrar x -o+ -cl "$PATCHDIR/pstfixpack.rar" "$TARGETDIR" || die -rm "$TARGETDIR/setup-pst-fix.exe" -cd "$TARGETDIR" - -case "$LANGUAGE" in - "German" ) langno=1 ;; - "Spanish" ) langno=2 ;; - "Italian" ) langno=3 ;; - * ) langno=0 ;; -esac - -# echo to install all manually as --yes assumes English -echo -e "${langno}\nn\ni\ni\ni\n\n" \ -| WeiDU --continue setup-pst-fix.tp2 || die - -setperms "$TARGETDIR" diff --git a/pst/install-patch-tweaks.sh b/pst/install-patch-tweaks.sh deleted file mode 100755 index 74acede..0000000 --- a/pst/install-patch-tweaks.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -# Copyright 2009 Nick White -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# See for a copy of the GNU General -# Public License. -# -# Planescape: Torment Tweaks -# Note: this only installs the Stackable Items and Save Nordom tweaks -# Note: This requires the freeware version of unrar, available -# from http://www.rarlab.com/rar_add.htm - -scriptdir="$(dirname $0)"/.. -source "$scriptdir/includes/generic-includes.sh" -source "$scriptdir/includes/patch-includes.sh" - -parseargs "$@" - -checkforbin WeiDU unrar - -setuptmp - -getpatch "http://www.shsforums.net/index.php?automodule=downloads&req=download&code=confirm_download&id=649" psttweak.rar - -unrar x -o+ -cl "$PATCHDIR/psttweak.rar" "$TARGETDIR" || die -rm "$TARGETDIR/setup-pst-tweak.exe" -cd "$TARGETDIR" - -case "$LANGUAGE" in - "German" ) langno=1 ;; - "Spanish" ) langno=2 ;; - "Italian" ) langno=3 ;; - * ) langno=0 ;; -esac - -# echo to install all manually as --yes assumes English -echo -e "${langno}\nn\nn\nn\nn\ni\nn\ni\nn\nn\nn\nn\nn\nn\nn\nn\nn\n" \ -| WeiDU --continue setup-pst-tweak.tp2 || die - -setperms "$TARGETDIR" diff --git a/pst/install-patch-ub.sh b/pst/install-patch-ub.sh deleted file mode 100755 index 8f90f44..0000000 --- a/pst/install-patch-ub.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -# Copyright 2009 Nick White -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# See for a copy of the GNU General -# Public License. -# -# Planescape: Torment Unfinished Business -# Note: This requires the freeware version of unrar, available -# from http://www.rarlab.com/rar_add.htm - -scriptdir="$(dirname $0)"/.. -source "$scriptdir/includes/generic-includes.sh" -source "$scriptdir/includes/patch-includes.sh" - -parseargs "$@" - -checkforbin WeiDU unrar - -setuptmp - -getpatch "http://www.shsforums.net/index.php?automodule=downloads&req=download&code=confirm_download&id=648" pstub.rar - -unrar x -o+ -cl "$PATCHDIR/pstub.rar" "$TARGETDIR" || die -rm "$TARGETDIR/setup-pst-ub.exe" -cd "$TARGETDIR" - -case "$LANGUAGE" in - "German" ) langno=1 ;; - "Spanish" ) langno=2 ;; - "Italian" ) langno=3 ;; - * ) langno=0 ;; -esac - -# echo to install all manually as --yes assumes English -echo -e "${langno}\nn\ni\ni\nn\n\n" \ -| WeiDU --continue setup-pst-ub.tp2 || die - -setperms "$TARGETDIR" -- cgit v1.2.3 From f370d9f9392270acecf87921c8961c32f0327fe8 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 16 Apr 2009 09:34:35 +0100 Subject: Use scriptdir to allow running from anywhere --- auto-installer.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/auto-installer.sh b/auto-installer.sh index e7de650..b68fd45 100755 --- a/auto-installer.sh +++ b/auto-installer.sh @@ -86,12 +86,12 @@ esac echo "$FULLGAMENAME detected, installing" -$MINSCRIPT -i "$TARGETDIR" -c "$CDMOUNT" 1>/dev/null || diequietly +"$scriptdir/$MINSCRIPT" -i "$TARGETDIR" -c "$CDMOUNT" 1>/dev/null || diequietly -if [ -n "$EXTRASCRIPT" ]; then +if [ -n "$scriptdir/$EXTRASCRIPT" ]; then if query "Do you want to do a full install, so the CDs will not be needed again?" y; then FULLINSTALL=1 - $EXTRASCRIPT -i "$TARGETDIR" -c "$CDMOUNT" 1>/dev/null || diequietly + "$scriptdir/$EXTRASCRIPT" -i "$TARGETDIR" -c "$CDMOUNT" 1>/dev/null || diequietly else FULLINSTALL=0 fi @@ -99,6 +99,7 @@ fi if [ -n "$PATCHES" ]; then for patch in $PATCHES; do + patch="$scriptdir/$patch" # grab 17th line from scripts (description line; after license) patchtitle=$(sed -n 17p $patch|cut -d ' ' -f 2-) if query "Do you want to install $patchtitle" y; then -- cgit v1.2.3 From 4a9b84dea70ece6354f3cde80a084dc2009e65c6 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 16 Apr 2009 09:36:12 +0100 Subject: Removed obselete FULLGAMENAME refs --- includes/generic-includes.sh | 2 +- pst/install-2cd-minimal.sh | 2 -- pst/install-4cd-minimal.sh | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/includes/generic-includes.sh b/includes/generic-includes.sh index c441f55..bd0176f 100644 --- a/includes/generic-includes.sh +++ b/includes/generic-includes.sh @@ -30,7 +30,7 @@ function die echo "" echo "The install failed; sorry." - echo "Please make sure you have the correct CDs for $FULLGAMENAME" + echo "Please make sure you have the correct CDs for the game" echo "and enough free disk space, and try again." exit 1 diff --git a/pst/install-2cd-minimal.sh b/pst/install-2cd-minimal.sh index ecc8c8a..fa8fa04 100755 --- a/pst/install-2cd-minimal.sh +++ b/pst/install-2cd-minimal.sh @@ -16,8 +16,6 @@ # # Planescape: Torment (2CD version) minimal -FULLGAMENAME="Planescape Torment: 2CD version" - scriptdir="$(dirname $0)"/.. source "$scriptdir/includes/generic-includes.sh" source "$scriptdir/includes/cd-includes.sh" diff --git a/pst/install-4cd-minimal.sh b/pst/install-4cd-minimal.sh index 517b86e..3552312 100755 --- a/pst/install-4cd-minimal.sh +++ b/pst/install-4cd-minimal.sh @@ -16,8 +16,6 @@ # # Installs Planescape: Torment (4CD version) minimal -FULLGAMENAME="Planescape Torment: 4CD version" - scriptdir="$(dirname $0)"/.. source "$scriptdir/includes/generic-includes.sh" source "$scriptdir/includes/cd-includes.sh" -- cgit v1.2.3 From c983586e82ad6dc583da41e688e92e5ee2a16183 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 16 Apr 2009 09:37:03 +0100 Subject: Enable removal of failed install --- includes/generic-includes.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/generic-includes.sh b/includes/generic-includes.sh index bd0176f..4537501 100644 --- a/includes/generic-includes.sh +++ b/includes/generic-includes.sh @@ -25,8 +25,8 @@ function die { - #echo "Install can not continue, cleaning up partial install" - #rm -rf "$TARGETDIR" + echo "Install can not continue, cleaning up partial install" + rm -rf "$TARGETDIR" echo "" echo "The install failed; sorry." -- cgit v1.2.3 From a38c94d2da0ba7e14001979de8d13234cd8867ca Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 16 Apr 2009 11:29:21 +0100 Subject: Added autoinstaller menu to choose game manually --- TODO | 1 - 1 file changed, 1 deletion(-) delete mode 100644 TODO diff --git a/TODO b/TODO deleted file mode 100644 index 4076af8..0000000 --- a/TODO +++ /dev/null @@ -1 +0,0 @@ -Add option to manually choose game version from list -- cgit v1.2.3 From eb9593d8616995cb9e88e9192acdaa9582d332fd Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 16 Apr 2009 11:31:39 +0100 Subject: Added autoinstaller menu to choose game manually --- auto-installer.sh | 99 ++++++++++++++++++++-------------------- includes/autoinstall-includes.sh | 29 ++++++++++++ 2 files changed, 79 insertions(+), 49 deletions(-) diff --git a/auto-installer.sh b/auto-installer.sh index b68fd45..206523d 100755 --- a/auto-installer.sh +++ b/auto-installer.sh @@ -34,55 +34,56 @@ parseargs "$@" echo "Checking CD version" CDMD5=$(md5sum $CDMOUNT/data1.cab|awk '{print $1}') -case "$CDMD5" in - "138528155dfeb695bd63f90eacee7dc0" ) - FULLGAMENAME="Baldurs Gate 1: 5CD International version" - SHORTGAMENAME="bg1" - MINSCRIPT=bg1/install-5cd-minimal.sh - EXTRASCRIPT=bg1/install-5cd-extra.sh - PATCHES="bg1/install-patch-intl.sh bg1/install-patch-baldurdash-fix.sh bg1/install-patch-baldurdash-text.sh" - WINDOWSFILES="baldur.exe bgmain.exe config.exe keymap.ini luaauto.cfg update.url" - CDNO=5 - ;; - "1a6828b97a27967e8c4acc25e1ef48d2" ) - FULLGAMENAME="Baldurs Gate Tales of the Sword Coast: 3CD US version" - SHORTGAMENAME="bg1" - MINSCRIPT=totsc/install-3cd-minimal.sh - EXTRASCRIPT=bg1/install-3cd-extra.sh - PATCHES="bg1/install-patch-baldurdash-fix.sh bg1/install-patch-baldurdash-text.sh" - WINDOWSFILES="baldur.exe bgmain.exe config.exe keymap.ini luaauto.cfg update.url" - CDNO=3 - ;; - "e27d259ddc0171ff945dbba136e60309" ) - FULLGAMENAME="Baldurs Gate Tales of the Sword Coast: 1CD UK version" - SHORTGAMENAME="totsc" - MINSCRIPT=totsc/install-1cd-uk.sh - PATCHES="totsc/install-patch-uk.sh totsc/install-patch-baldurdash-fix.sh totsc/install-patch-baldurdash-text.sh" - WINDOWSFILES="bgmain2.exe baldur.exe config.exe mconvert.exe" - ;; - "640b61443cc86c434f1b6826e63c0e33" ) - FULLGAMENAME="Planescape Torment: 2CD version" - SHORTGAMENAME="pst" - MINSCRIPT=pst/install-2cd-minimal.sh - EXTRASCRIPT=pst/install-2cd-extra.sh - WINDOWSFILES="torment.exe ereg" - CDNO=2 - ;; - "5e8c2075163aca124de4a467fb33063d" ) - FULLGAMENAME="Planescape Torment: 4CD version" - SHORTGAMENAME="pst" - MINSCRIPT=pst/install-4cd-minimal.sh - EXTRASCRIPT=pst/install-4cd-extra.sh - PATCHES="pst/install-patch-official.sh" - WINDOWSFILES="torment.exe ereg" - CDNO=4 - ;; - * ) - echo "Unrecognised CD - please select game from menu" - # TODO: Add menu to show and select all known BG1 versions - exit 1 - ;; -esac +while [ -z "$MINSCRIPT" ]; do + case "$CDMD5" in + "138528155dfeb695bd63f90eacee7dc0" ) + FULLGAMENAME="Baldurs Gate 1: 5CD International version" + SHORTGAMENAME="bg1" + MINSCRIPT=bg1/install-5cd-minimal.sh + EXTRASCRIPT=bg1/install-5cd-extra.sh + PATCHES="bg1/install-patch-intl.sh bg1/install-patch-baldurdash-fix.sh bg1/install-patch-baldurdash-text.sh" + WINDOWSFILES="baldur.exe bgmain.exe config.exe keymap.ini luaauto.cfg update.url" + CDNO=5 + ;; + "1a6828b97a27967e8c4acc25e1ef48d2" ) + FULLGAMENAME="Baldurs Gate & Tales of the Sword Coast: 3CD US version" + SHORTGAMENAME="totsc" + MINSCRIPT=totsc/install-3cd-minimal.sh + EXTRASCRIPT=totsc/install-3cd-extra.sh + PATCHES="totsc/install-patch-baldurdash-fix.sh totsc/install-patch-baldurdash-text.sh" + WINDOWSFILES="baldur.exe bgmain.exe config.exe keymap.ini luaauto.cfg update.url" + CDNO=3 + ;; + "e27d259ddc0171ff945dbba136e60309" ) + FULLGAMENAME="Baldurs Gate Tales of the Sword Coast: 1CD UK version" + SHORTGAMENAME="totsc" + MINSCRIPT=totsc/install-1cd-uk.sh + PATCHES="totsc/install-patch-uk.sh totsc/install-patch-baldurdash-fix.sh totsc/install-patch-baldurdash-text.sh" + WINDOWSFILES="bgmain2.exe baldur.exe config.exe mconvert.exe" + ;; + "640b61443cc86c434f1b6826e63c0e33" ) + FULLGAMENAME="Planescape Torment: 2CD version" + SHORTGAMENAME="pst" + MINSCRIPT=pst/install-2cd-minimal.sh + EXTRASCRIPT=pst/install-2cd-extra.sh + WINDOWSFILES="torment.exe ereg" + CDNO=2 + ;; + "5e8c2075163aca124de4a467fb33063d" ) + FULLGAMENAME="Planescape Torment: 4CD version" + SHORTGAMENAME="pst" + MINSCRIPT=pst/install-4cd-minimal.sh + EXTRASCRIPT=pst/install-4cd-extra.sh + PATCHES="pst/install-patch-official.sh" + WINDOWSFILES="torment.exe ereg" + CDNO=4 + ;; + * ) + echo "Unrecognised CD - please select game from menu" + choosegame + ;; + esac +done echo "$FULLGAMENAME detected, installing" diff --git a/includes/autoinstall-includes.sh b/includes/autoinstall-includes.sh index 05465ba..fada3d3 100644 --- a/includes/autoinstall-includes.sh +++ b/includes/autoinstall-includes.sh @@ -37,6 +37,35 @@ function query { done } +function choosegame +{ + while true; do + choice=0 + echo "Choose the game to install from the list:" + echo "1 | Baldur's Gate 1 (5CD International version)" + echo "2 | Baldurs Gate & Tales of the Sword Coast (3CD US version)" + echo "3 | Tales of the Sword Coast (1CD UK version)" + echo "4 | Planescape: Torment (4CD version)" + echo "5 | Planescape: Torment (2CD version)" + + read -n 1 choice + echo + + case $choice in + 1 ) export CDMD5="138528155dfeb695bd63f90eacee7dc0" + return 0 ;; + 2 ) export CDMD5="1a6828b97a27967e8c4acc25e1ef48d2" + return 0 ;; + 3 ) export CDMD5="e27d259ddc0171ff945dbba136e60309" + return 0 ;; + 4 ) export CDMD5="5e8c2075163aca124de4a467fb33063d" + return 0 ;; + 5 ) export CDMD5="640b61443cc86c434f1b6826e63c0e33" + return 0 ;; + esac + done +} + function recommendcfg { # usage: recommendcfg [numofcds] -- cgit v1.2.3 From 18087561765ad596df00f106b9b9c80a90397e20 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 16 Apr 2009 11:33:49 +0100 Subject: Moved totsc scripts to correct location --- bg1/install-3cd-extra.sh | 36 --------------------------- bg1/install-3cd-minimal.sh | 58 -------------------------------------------- totsc/install-3cd-extra.sh | 36 +++++++++++++++++++++++++++ totsc/install-3cd-minimal.sh | 58 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+), 94 deletions(-) delete mode 100755 bg1/install-3cd-extra.sh delete mode 100755 bg1/install-3cd-minimal.sh create mode 100755 totsc/install-3cd-extra.sh create mode 100755 totsc/install-3cd-minimal.sh diff --git a/bg1/install-3cd-extra.sh b/bg1/install-3cd-extra.sh deleted file mode 100755 index 31cc5d7..0000000 --- a/bg1/install-3cd-extra.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -# Copyright 2009 Nick White -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# See for a copy of the GNU General -# Public License. -# -# Extra Baldur's Gate (3CD version) content (so CDs aren't needed) - -scriptdir="$(dirname $0)"/.. -source "$scriptdir/includes/generic-includes.sh" -source "$scriptdir/includes/cd-includes.sh" - -parseargs "$@" - -copylower "$CDMOUNT/cd1/" "$TARGETDIR" - -getcd 2 c04758a6af171bf9a35d8e3d4dcd807c CD2/Movies/MovieCD2.bif -copylower "$CDMOUNT/cd2/" "$TARGETDIR" -copylower "$CDMOUNT/cd5/" "$TARGETDIR" -cp $CDMOUNT/CD2/Manual/Baldur.pdf "$TARGETDIR"/manual || die - -getcd 3 ba4224f50f890e10561d22f602d6a991 CD3/Movies/MovieCD3.bif -copylower "$CDMOUNT/cd3/" "$TARGETDIR" -copylower "$CDMOUNT/cd4/" "$TARGETDIR" -copylower "$CDMOUNT/cd6/" "$TARGETDIR" -setperms "$TARGETDIR" diff --git a/bg1/install-3cd-minimal.sh b/bg1/install-3cd-minimal.sh deleted file mode 100755 index 09d189b..0000000 --- a/bg1/install-3cd-minimal.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash -# Copyright 2009 Nick White -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# See for a copy of the GNU General -# Public License. -# -# Baldur's Gate & Tales of the Sword Coast (3CD version) minimal - -scriptdir="$(dirname $0)"/.. -source "$scriptdir/includes/generic-includes.sh" -source "$scriptdir/includes/cd-includes.sh" - -parseargs "$@" - -checkforbin unshield - -getcd 1 1a6828b97a27967e8c4acc25e1ef48d2 data1.cab - -mkdir -p "$TARGETDIR" || die - -cp $CDMOUNT/dialog.tlk "$TARGETDIR" || die - -unshield -L x $CDMOUNT/data1.cab -d "$TARGETDIR" || die - -cp -R "$TARGETDIR"/minimumdata/* "$TARGETDIR" || die -rm -r "$TARGETDIR"/minimumdata - -cp -R "$TARGETDIR"/recommended_music/music/* "$TARGETDIR"/music/ || die -rm -r "$TARGETDIR"/recommended_music - -cp -R "$TARGETDIR"/english_sounds/sounds/* "$TARGETDIR"/sounds/ || die -rm -r "$TARGETDIR"/english_sounds - -cp -R "$TARGETDIR"/english/* "$TARGETDIR" || die -rm -r "$TARGETDIR"/english - -mkdir -p "$TARGETDIR"/movies -mkdir -p "$TARGETDIR"/manual - -mkdir -p "$TARGETDIR"/save -cp -R $CDMOUNT/[Ss]ave/* "$TARGETDIR"/save || die - -cp $CDMOUNT/Manual/BGManual.pdf "$TARGETDIR"/manual/ || die -cp $CDMOUNT/Manual/TotscManual.pdf "$TARGETDIR"/manual/ || die - -cp $CDMOUNT/baldur.ico "$TARGETDIR" || die - -setperms "$TARGETDIR" diff --git a/totsc/install-3cd-extra.sh b/totsc/install-3cd-extra.sh new file mode 100755 index 0000000..31cc5d7 --- /dev/null +++ b/totsc/install-3cd-extra.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# +# Extra Baldur's Gate (3CD version) content (so CDs aren't needed) + +scriptdir="$(dirname $0)"/.. +source "$scriptdir/includes/generic-includes.sh" +source "$scriptdir/includes/cd-includes.sh" + +parseargs "$@" + +copylower "$CDMOUNT/cd1/" "$TARGETDIR" + +getcd 2 c04758a6af171bf9a35d8e3d4dcd807c CD2/Movies/MovieCD2.bif +copylower "$CDMOUNT/cd2/" "$TARGETDIR" +copylower "$CDMOUNT/cd5/" "$TARGETDIR" +cp $CDMOUNT/CD2/Manual/Baldur.pdf "$TARGETDIR"/manual || die + +getcd 3 ba4224f50f890e10561d22f602d6a991 CD3/Movies/MovieCD3.bif +copylower "$CDMOUNT/cd3/" "$TARGETDIR" +copylower "$CDMOUNT/cd4/" "$TARGETDIR" +copylower "$CDMOUNT/cd6/" "$TARGETDIR" +setperms "$TARGETDIR" diff --git a/totsc/install-3cd-minimal.sh b/totsc/install-3cd-minimal.sh new file mode 100755 index 0000000..09d189b --- /dev/null +++ b/totsc/install-3cd-minimal.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Copyright 2009 Nick White +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# See for a copy of the GNU General +# Public License. +# +# Baldur's Gate & Tales of the Sword Coast (3CD version) minimal + +scriptdir="$(dirname $0)"/.. +source "$scriptdir/includes/generic-includes.sh" +source "$scriptdir/includes/cd-includes.sh" + +parseargs "$@" + +checkforbin unshield + +getcd 1 1a6828b97a27967e8c4acc25e1ef48d2 data1.cab + +mkdir -p "$TARGETDIR" || die + +cp $CDMOUNT/dialog.tlk "$TARGETDIR" || die + +unshield -L x $CDMOUNT/data1.cab -d "$TARGETDIR" || die + +cp -R "$TARGETDIR"/minimumdata/* "$TARGETDIR" || die +rm -r "$TARGETDIR"/minimumdata + +cp -R "$TARGETDIR"/recommended_music/music/* "$TARGETDIR"/music/ || die +rm -r "$TARGETDIR"/recommended_music + +cp -R "$TARGETDIR"/english_sounds/sounds/* "$TARGETDIR"/sounds/ || die +rm -r "$TARGETDIR"/english_sounds + +cp -R "$TARGETDIR"/english/* "$TARGETDIR" || die +rm -r "$TARGETDIR"/english + +mkdir -p "$TARGETDIR"/movies +mkdir -p "$TARGETDIR"/manual + +mkdir -p "$TARGETDIR"/save +cp -R $CDMOUNT/[Ss]ave/* "$TARGETDIR"/save || die + +cp $CDMOUNT/Manual/BGManual.pdf "$TARGETDIR"/manual/ || die +cp $CDMOUNT/Manual/TotscManual.pdf "$TARGETDIR"/manual/ || die + +cp $CDMOUNT/baldur.ico "$TARGETDIR" || die + +setperms "$TARGETDIR" -- cgit v1.2.3 From 3f6d4345d73a4ff238417a3be9176659fcf311e1 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 16 Apr 2009 11:37:48 +0100 Subject: Normalised function style --- includes/autoinstall-includes.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/autoinstall-includes.sh b/includes/autoinstall-includes.sh index fada3d3..7ee3024 100644 --- a/includes/autoinstall-includes.sh +++ b/includes/autoinstall-includes.sh @@ -22,7 +22,8 @@ # a simplified version of query() from sorcery # $1 = question # $2 = default boolean answer [yYnN] -function query { +function query +{ while true; do RESPONSE="" echo -e -n "$1 [$2] " -- cgit v1.2.3 From 9d977397941833ab810eb41cd4c8895b40d929fc Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 16 Apr 2009 11:39:42 +0100 Subject: Removed obselete copycdextras function --- includes/cd-includes.sh | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/includes/cd-includes.sh b/includes/cd-includes.sh index b9c3a3c..e234c9b 100644 --- a/includes/cd-includes.sh +++ b/includes/cd-includes.sh @@ -53,15 +53,3 @@ function getcd return 0 } - -function copycdextras -{ - # usage: copycdextras cdnum - # essentially a case insensitive cp -R cd#/* - CDNUMBER=$1 - - for filename in $(find $CDMOUNT/[cC][dD]$CDNUMBER/ -type f || die); do - relativepath=$(echo $filename|gawk -F "$CDMOUNT/[cC][dD]$CDNUMBER" '{print $2}'|tr A-Z a-z) - cp $filename "$TARGETDIR"/$relativepath || die - done -} -- cgit v1.2.3 From ae8f80f7ef3900af963ae1aa55ee066a907e7e3b Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 16 Apr 2009 11:43:19 +0100 Subject: Comment housekeeping --- includes/generic-includes.sh | 6 ++++-- includes/patch-includes.sh | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/generic-includes.sh b/includes/generic-includes.sh index 4537501..3cc65de 100644 --- a/includes/generic-includes.sh +++ b/includes/generic-includes.sh @@ -74,7 +74,7 @@ function checkforbin function setperms { - # usage setperms targetdir + # usage: setperms targetdir if ! [ -d "$1" ]; then return 1 @@ -109,6 +109,8 @@ function usage function parseargs { + # usage: parseargs args... + while getopts ":i:p:c:l:" options; do case $options in i ) export TARGETDIR="$OPTARG";; @@ -125,7 +127,7 @@ function parseargs function copylower { - #usage: copylower source destination + # 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)" diff --git a/includes/patch-includes.sh b/includes/patch-includes.sh index 8c06f8f..7081e9d 100644 --- a/includes/patch-includes.sh +++ b/includes/patch-includes.sh @@ -21,6 +21,8 @@ function getpatch { + # usage: getpatch url [filename] + url=$1 if [ $# -gt 1 ]; then filename="$2" -- cgit v1.2.3 From 1c9428ba23149f6d07556f658270db45ddcd9ff6 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 16 Apr 2009 11:49:13 +0100 Subject: Make patch failure non-critical --- auto-installer.sh | 2 +- includes/patch-includes.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/auto-installer.sh b/auto-installer.sh index 206523d..822fc61 100755 --- a/auto-installer.sh +++ b/auto-installer.sh @@ -109,7 +109,7 @@ if [ -n "$PATCHES" ]; then -p "$PATCHDIR" \ -l "$LANGUAGE" \ -c "$CDMOUNT" \ - 1>/dev/null || diequietly + 1>/dev/null fi done fi diff --git a/includes/patch-includes.sh b/includes/patch-includes.sh index 7081e9d..c9bbd30 100644 --- a/includes/patch-includes.sh +++ b/includes/patch-includes.sh @@ -36,3 +36,13 @@ function getpatch wget $url -O $TMPDIR/$filename || die fi } + +function die +{ + # override main die for patches so they won't wipe out + # a whole install + + echo " ! The patch install failed; sorry." 1>&2 + + exit 1 +} -- cgit v1.2.3 From 7560300c9a9779802c73bcec2a78c54ea070f16d Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 16 Apr 2009 12:07:45 +0100 Subject: Fixed bug detecting if there are any extras to install --- auto-installer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auto-installer.sh b/auto-installer.sh index 822fc61..a54e107 100755 --- a/auto-installer.sh +++ b/auto-installer.sh @@ -89,7 +89,7 @@ echo "$FULLGAMENAME detected, installing" "$scriptdir/$MINSCRIPT" -i "$TARGETDIR" -c "$CDMOUNT" 1>/dev/null || diequietly -if [ -n "$scriptdir/$EXTRASCRIPT" ]; then +if [ -n "$EXTRASCRIPT" ]; then if query "Do you want to do a full install, so the CDs will not be needed again?" y; then FULLINSTALL=1 "$scriptdir/$EXTRASCRIPT" -i "$TARGETDIR" -c "$CDMOUNT" 1>/dev/null || diequietly -- cgit v1.2.3 From 49c5010c068bb845aa09cabdb7a94ded4823cc47 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 16 Apr 2009 12:10:24 +0100 Subject: Tiny housekeeping --- totsc/install-1cd-uk.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/totsc/install-1cd-uk.sh b/totsc/install-1cd-uk.sh index 09c4f74..361fdbb 100755 --- a/totsc/install-1cd-uk.sh +++ b/totsc/install-1cd-uk.sh @@ -14,7 +14,7 @@ # See for a copy of the GNU General # Public License. # -# Tales of the Sword Coast (1CD version) +# Tales of the Sword Coast (1CD UK version) scriptdir="$(dirname $0)"/.. source "$scriptdir/includes/generic-includes.sh" -- cgit v1.2.3 From bdd2dc3b38860dd2c061b302b112ef3f5569c597 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 16 Apr 2009 12:42:16 +0100 Subject: Small fixes to totsc installer --- auto-installer.sh | 1 + totsc/install-1cd-uk.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/auto-installer.sh b/auto-installer.sh index a54e107..1fcdbc3 100755 --- a/auto-installer.sh +++ b/auto-installer.sh @@ -60,6 +60,7 @@ while [ -z "$MINSCRIPT" ]; do MINSCRIPT=totsc/install-1cd-uk.sh PATCHES="totsc/install-patch-uk.sh totsc/install-patch-baldurdash-fix.sh totsc/install-patch-baldurdash-text.sh" WINDOWSFILES="bgmain2.exe baldur.exe config.exe mconvert.exe" + CDNO=6 ;; "640b61443cc86c434f1b6826e63c0e33" ) FULLGAMENAME="Planescape Torment: 2CD version" diff --git a/totsc/install-1cd-uk.sh b/totsc/install-1cd-uk.sh index 361fdbb..d625afc 100755 --- a/totsc/install-1cd-uk.sh +++ b/totsc/install-1cd-uk.sh @@ -33,7 +33,6 @@ unshield -L x $CDMOUNT/data1.cab -d "$TARGETDIR" || die cp $CDMOUNT/dialog.tlk "$TARGETDIR" || die mkdir -p "$TARGETDIR"/save || die -cp -R $CDMOUNT/[Ss]ave/* "$TARGETDIR"/save || die cp -R "$TARGETDIR"/minimumdata/* "$TARGETDIR" || die rm -r "$TARGETDIR"/minimumdata @@ -47,5 +46,6 @@ mkdir -p "$TARGETDIR"/movies copylower "$CDMOUNT/cd6/" "$TARGETDIR" mkdir -p "$TARGETDIR"/mpsave +cp -R $CDMOUNT/[Ss]ave/* "$TARGETDIR"/mpsave || die setperms "$TARGETDIR" -- cgit v1.2.3 From c2c29265815ddfa73d77276bc2fd5a53be08e608 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 16 Apr 2009 12:45:01 +0100 Subject: Further totsc fixups --- totsc/install-3cd-minimal.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/totsc/install-3cd-minimal.sh b/totsc/install-3cd-minimal.sh index 09d189b..3493cad 100755 --- a/totsc/install-3cd-minimal.sh +++ b/totsc/install-3cd-minimal.sh @@ -48,7 +48,8 @@ mkdir -p "$TARGETDIR"/movies mkdir -p "$TARGETDIR"/manual mkdir -p "$TARGETDIR"/save -cp -R $CDMOUNT/[Ss]ave/* "$TARGETDIR"/save || die +mkdir -p "$TARGETDIR"/mpsave +cp -R $CDMOUNT/[Ss]ave/* "$TARGETDIR"/mpsave || die cp $CDMOUNT/Manual/BGManual.pdf "$TARGETDIR"/manual/ || die cp $CDMOUNT/Manual/TotscManual.pdf "$TARGETDIR"/manual/ || die -- cgit v1.2.3 From 3603dfcb5d12e19b75dccbc2a621adb83fd7adea Mon Sep 17 00:00:00 2001 From: Nick White Date: Fri, 17 Apr 2009 17:10:07 +0100 Subject: Move overridden die for patch to new general function: diesoftly --- bg1/install-patch-baldurdash-fix.sh | 2 +- bg1/install-patch-baldurdash-text.sh | 4 ++-- bg1/install-patch-intl.sh | 6 +++--- bg1/install-patch-us.sh | 6 +++--- includes/generic-includes.sh | 9 +++++++++ includes/patch-includes.sh | 10 ---------- pst/install-patch-official.sh | 6 +++--- totsc/install-patch-baldurdash-fix.sh | 2 +- totsc/install-patch-baldurdash-text.sh | 4 ++-- totsc/install-patch-intl.sh | 6 +++--- totsc/install-patch-uk.sh | 6 +++--- totsc/install-patch-us.sh | 6 +++--- 12 files changed, 33 insertions(+), 34 deletions(-) diff --git a/bg1/install-patch-baldurdash-fix.sh b/bg1/install-patch-baldurdash-fix.sh index ef00260..be9b3be 100755 --- a/bg1/install-patch-baldurdash-fix.sh +++ b/bg1/install-patch-baldurdash-fix.sh @@ -32,7 +32,7 @@ getpatch http://www.baldurdash.org/LargeDownloads/BG1FixPack11.exe # part so don't print errors or die on failure unzip -L $TMPDIR/BG1FixPack11.exe -d $TMPDIR 2>/dev/null rm $TMPDIR/BG1FixPack11.exe $TMPDIR/bg1fixpack11readme.txt -cp $TMPDIR/* "$TARGETDIR/override/" || die +cp $TMPDIR/* "$TARGETDIR/override/" || diesoftly cleanuptmp setperms "$TARGETDIR" diff --git a/bg1/install-patch-baldurdash-text.sh b/bg1/install-patch-baldurdash-text.sh index bab642d..9dbf9a9 100755 --- a/bg1/install-patch-baldurdash-text.sh +++ b/bg1/install-patch-baldurdash-text.sh @@ -24,7 +24,7 @@ parseargs "$@" if [ "$LANGUAGE" != "English" ]; then echo "The Baldurdash text pack is only available in English" - die + diesoftly fi checkforbin unzip wget @@ -36,7 +36,7 @@ getpatch http://www.baldurdash.org/LargeDownloads/BG1NoTOSCGameTextUpdate10.exe # unzip complains unnecessarily about skipping non-zip # part so don't print errors or die on failure unzip -L $TMPDIR/BG1NoTOSCGameTextUpdate10.exe -d $TMPDIR 2>/dev/null -cp $TMPDIR/dialog.tlk "$TARGETDIR/" || die +cp $TMPDIR/dialog.tlk "$TARGETDIR/" || diesoftly cleanuptmp setperms "$TARGETDIR" diff --git a/bg1/install-patch-intl.sh b/bg1/install-patch-intl.sh index 2c0aceb..2acb59e 100755 --- a/bg1/install-patch-intl.sh +++ b/bg1/install-patch-intl.sh @@ -28,11 +28,11 @@ setuptmp getpatch http://downloads.bioware.com/baldursgate1/bgintl114315.exe -unzip $TMPDIR/bgintl114315.exe -d $TMPDIR || die -unshield -g "$LANGUAGE" -L x $TMPDIR/data1.cab -d $TMPDIR || die +unzip $TMPDIR/bgintl114315.exe -d $TMPDIR || diesoftly +unshield -g "$LANGUAGE" -L x $TMPDIR/data1.cab -d $TMPDIR || diesoftly LANGUAGE="$(echo $LANGUAGE|tr A-Z a-z|tr ' ' _)" # alter formatting -cp -R $TMPDIR/"$LANGUAGE"/* "$TARGETDIR" || die +cp -R $TMPDIR/"$LANGUAGE"/* "$TARGETDIR" || diesoftly cleanuptmp setperms "$TARGETDIR" diff --git a/bg1/install-patch-us.sh b/bg1/install-patch-us.sh index 41a5e71..c3fe4b0 100755 --- a/bg1/install-patch-us.sh +++ b/bg1/install-patch-us.sh @@ -28,10 +28,10 @@ setuptmp getpatch http://downloads.bioware.com/baldursgate1/bg114315.exe -cabextract -L $TMPDIR/bg114315.exe -d $TMPDIR || die -unshield -L x $TMPDIR/data1.cab -d $TMPDIR || die +cabextract -L $TMPDIR/bg114315.exe -d $TMPDIR || diesoftly +unshield -L x $TMPDIR/data1.cab -d $TMPDIR || diesoftly -cp -R $TMPDIR/english/* "$TARGETDIR" || die +cp -R $TMPDIR/english/* "$TARGETDIR" || diesoftly cleanuptmp setperms "$TARGETDIR" diff --git a/includes/generic-includes.sh b/includes/generic-includes.sh index 3cc65de..d3db9bf 100644 --- a/includes/generic-includes.sh +++ b/includes/generic-includes.sh @@ -36,6 +36,15 @@ function die exit 1 } +function diesoftly +{ + # a non-destructive die + + echo " ! The install failed; sorry." 1>&2 + + exit 1 +} + function diequietly { exit 1 diff --git a/includes/patch-includes.sh b/includes/patch-includes.sh index c9bbd30..7081e9d 100644 --- a/includes/patch-includes.sh +++ b/includes/patch-includes.sh @@ -36,13 +36,3 @@ function getpatch wget $url -O $TMPDIR/$filename || die fi } - -function die -{ - # override main die for patches so they won't wipe out - # a whole install - - echo " ! The patch install failed; sorry." 1>&2 - - exit 1 -} diff --git a/pst/install-patch-official.sh b/pst/install-patch-official.sh index 4438bcd..5a9b200 100755 --- a/pst/install-patch-official.sh +++ b/pst/install-patch-official.sh @@ -28,10 +28,10 @@ setuptmp getpatch http://www.sorcerers.net/Games2/Torment/Trmt11.exe -cabextract -L $TMPDIR/Trmt11.exe -d $TMPDIR || die -unshield -L x $TMPDIR/data1.cab -d $TMPDIR || die +cabextract -L $TMPDIR/Trmt11.exe -d $TMPDIR || diesoftly +unshield -L x $TMPDIR/data1.cab -d $TMPDIR || diesoftly -cp -R $TMPDIR/program_executable_files/* "$TARGETDIR" || die +cp -R $TMPDIR/program_executable_files/* "$TARGETDIR" || diesoftly cleanuptmp setperms "$TARGETDIR" diff --git a/totsc/install-patch-baldurdash-fix.sh b/totsc/install-patch-baldurdash-fix.sh index ef00260..be9b3be 100755 --- a/totsc/install-patch-baldurdash-fix.sh +++ b/totsc/install-patch-baldurdash-fix.sh @@ -32,7 +32,7 @@ getpatch http://www.baldurdash.org/LargeDownloads/BG1FixPack11.exe # part so don't print errors or die on failure unzip -L $TMPDIR/BG1FixPack11.exe -d $TMPDIR 2>/dev/null rm $TMPDIR/BG1FixPack11.exe $TMPDIR/bg1fixpack11readme.txt -cp $TMPDIR/* "$TARGETDIR/override/" || die +cp $TMPDIR/* "$TARGETDIR/override/" || diesoftly cleanuptmp setperms "$TARGETDIR" diff --git a/totsc/install-patch-baldurdash-text.sh b/totsc/install-patch-baldurdash-text.sh index af7a861..36e4304 100755 --- a/totsc/install-patch-baldurdash-text.sh +++ b/totsc/install-patch-baldurdash-text.sh @@ -24,7 +24,7 @@ parseargs "$@" if [ "$LANGUAGE" != "English" ]; then echo "The Baldurdash text pack is only available in English" - die + diesoftly fi checkforbin unzip wget @@ -36,7 +36,7 @@ getpatch http://www.baldurdash.org/LargeDownloads/BG1TOSCGameTextUpdate11.exe # unzip complains unnecessarily about skipping non-zip # part so don't print errors or die on failure unzip -L $TMPDIR/BG1TOSCGameTextUpdate11.exe -d $TMPDIR 2>/dev/null -cp $TMPDIR/dialog.tlk "$TARGETDIR/" || die +cp $TMPDIR/dialog.tlk "$TARGETDIR/" || diesoftly cleanuptmp setperms "$TARGETDIR" diff --git a/totsc/install-patch-intl.sh b/totsc/install-patch-intl.sh index 1f25619..19c2b15 100755 --- a/totsc/install-patch-intl.sh +++ b/totsc/install-patch-intl.sh @@ -28,10 +28,10 @@ setuptmp getpatch http://downloads.bioware.com/baldursgate1/BGTalesIntl5512.exe -cabextract -L $TMPDIR/BGTalesIntl5512.exe -d $TMPDIR || die -unshield -L x $TMPDIR/data1.cab -d $TMPDIR || die +cabextract -L $TMPDIR/BGTalesIntl5512.exe -d $TMPDIR || diesoftly +unshield -L x $TMPDIR/data1.cab -d $TMPDIR || diesoftly -cp -R $TMPDIR/minimumdata/* "$TARGETDIR" || die +cp -R $TMPDIR/minimumdata/* "$TARGETDIR" || diesoftly cleanuptmp setperms "$TARGETDIR" diff --git a/totsc/install-patch-uk.sh b/totsc/install-patch-uk.sh index 144ac66..09ea70c 100755 --- a/totsc/install-patch-uk.sh +++ b/totsc/install-patch-uk.sh @@ -28,10 +28,10 @@ setuptmp getpatch http://downloads.bioware.com/baldursgate1/BGTalesUK5512.exe -cabextract -L $TMPDIR/BGTalesUK5512.exe -d $TMPDIR || die -unshield -L x $TMPDIR/data1.cab -d $TMPDIR || die +cabextract -L $TMPDIR/BGTalesUK5512.exe -d $TMPDIR || diesoftly +unshield -L x $TMPDIR/data1.cab -d $TMPDIR || diesoftly -cp -R $TMPDIR/minimumdata/* "$TARGETDIR" || die +cp -R $TMPDIR/minimumdata/* "$TARGETDIR" || diesoftly cleanuptmp setperms "$TARGETDIR" diff --git a/totsc/install-patch-us.sh b/totsc/install-patch-us.sh index ac17078..5939ac4 100755 --- a/totsc/install-patch-us.sh +++ b/totsc/install-patch-us.sh @@ -28,10 +28,10 @@ setuptmp getpatch http://downloads.bioware.com/baldursgate1/BGTalesUS5512.exe -cabextract -L $TMPDIR/BGTalesUS5512.exe -d $TMPDIR || die -unshield -L x $TMPDIR/data1.cab -d $TMPDIR || die +cabextract -L $TMPDIR/BGTalesUS5512.exe -d $TMPDIR || diesoftly +unshield -L x $TMPDIR/data1.cab -d $TMPDIR || diesoftly -cp -R $TMPDIR/minimumdata/* "$TARGETDIR" || die +cp -R $TMPDIR/minimumdata/* "$TARGETDIR" || diesoftly cleanuptmp setperms "$TARGETDIR" -- cgit v1.2.3 From 866bea02b158a371e46ad74e791451cbbfdba848 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 23 Apr 2009 09:23:17 +0100 Subject: Test to see if git updating works --- gittest | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 gittest diff --git a/gittest b/gittest new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3 From a6a068beefb220971dc2bfdd75c4bb202d3819cf Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 23 Apr 2009 10:11:39 +0100 Subject: End of git test --- gittest | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 gittest diff --git a/gittest b/gittest deleted file mode 100644 index e69de29..0000000 -- cgit v1.2.3 From a6055bfb9b9847021ab93cddfdc31357b2c7fc38 Mon Sep 17 00:00:00 2001 From: Nick White Date: Fri, 1 May 2009 09:40:15 +0100 Subject: Fixed targetdir setting (thanks Nick Daly) Fixed a problem with setting targetdir which could result in the current directory being deleted. --- auto-installer.sh | 3 +++ includes/generic-includes.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/auto-installer.sh b/auto-installer.sh index 1fcdbc3..655bbaa 100755 --- a/auto-installer.sh +++ b/auto-installer.sh @@ -86,6 +86,9 @@ while [ -z "$MINSCRIPT" ]; do esac done +[ -z "$TARGETDIR" ] && [ -n "$SHORTGAMENAME" ] && export TARGETDIR="$PWD/$SHORTGAMENAME" +[ -z "$TARGETDIR" ] && diequietly + echo "$FULLGAMENAME detected, installing" "$scriptdir/$MINSCRIPT" -i "$TARGETDIR" -c "$CDMOUNT" 1>/dev/null || diequietly diff --git a/includes/generic-includes.sh b/includes/generic-includes.sh index d3db9bf..983853a 100644 --- a/includes/generic-includes.sh +++ b/includes/generic-includes.sh @@ -17,7 +17,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" -- cgit v1.2.3 From ebdd12a60dfdb8db6976762653764f6b2533d9c9 Mon Sep 17 00:00:00 2001 From: Nick White Date: Fri, 1 May 2009 10:11:25 +0100 Subject: Add a few more anti-clobbering protections --- auto-installer.sh | 3 +++ includes/generic-includes.sh | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/auto-installer.sh b/auto-installer.sh index 655bbaa..b3ec696 100755 --- a/auto-installer.sh +++ b/auto-installer.sh @@ -89,6 +89,9 @@ done [ -z "$TARGETDIR" ] && [ -n "$SHORTGAMENAME" ] && export TARGETDIR="$PWD/$SHORTGAMENAME" [ -z "$TARGETDIR" ] && diequietly +# if targetdir already exists, make sure we never clobber it +[ -d "$TARGETDIR" ] && export alwaysdiesafely=1 + echo "$FULLGAMENAME detected, installing" "$scriptdir/$MINSCRIPT" -i "$TARGETDIR" -c "$CDMOUNT" 1>/dev/null || diequietly diff --git a/includes/generic-includes.sh b/includes/generic-includes.sh index 983853a..43474af 100644 --- a/includes/generic-includes.sh +++ b/includes/generic-includes.sh @@ -25,8 +25,12 @@ function die { - echo "Install can not continue, cleaning up partial install" - rm -rf "$TARGETDIR" + echo "Install can not continue" + + if [ "$alwaysdiesafely" != "1" ]; then + echo "Cleaning up partial install" + rm -rf "$TARGETDIR" + fi echo "" echo "The install failed; sorry." -- cgit v1.2.3 From 28083ccefa13e4137afb300544072e7e176c7de8 Mon Sep 17 00:00:00 2001 From: Nick White Date: Fri, 1 May 2009 10:38:18 +0100 Subject: Changed default install paths to not clash with script directory names --- auto-installer.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/auto-installer.sh b/auto-installer.sh index b3ec696..a34a5cd 100755 --- a/auto-installer.sh +++ b/auto-installer.sh @@ -38,7 +38,7 @@ while [ -z "$MINSCRIPT" ]; do case "$CDMD5" in "138528155dfeb695bd63f90eacee7dc0" ) FULLGAMENAME="Baldurs Gate 1: 5CD International version" - SHORTGAMENAME="bg1" + SHORTGAMENAME="baldursgate1" MINSCRIPT=bg1/install-5cd-minimal.sh EXTRASCRIPT=bg1/install-5cd-extra.sh PATCHES="bg1/install-patch-intl.sh bg1/install-patch-baldurdash-fix.sh bg1/install-patch-baldurdash-text.sh" @@ -47,7 +47,7 @@ while [ -z "$MINSCRIPT" ]; do ;; "1a6828b97a27967e8c4acc25e1ef48d2" ) FULLGAMENAME="Baldurs Gate & Tales of the Sword Coast: 3CD US version" - SHORTGAMENAME="totsc" + SHORTGAMENAME="baldursgate1totsc" MINSCRIPT=totsc/install-3cd-minimal.sh EXTRASCRIPT=totsc/install-3cd-extra.sh PATCHES="totsc/install-patch-baldurdash-fix.sh totsc/install-patch-baldurdash-text.sh" @@ -56,7 +56,7 @@ while [ -z "$MINSCRIPT" ]; do ;; "e27d259ddc0171ff945dbba136e60309" ) FULLGAMENAME="Baldurs Gate Tales of the Sword Coast: 1CD UK version" - SHORTGAMENAME="totsc" + SHORTGAMENAME="baldursgate1totsc" MINSCRIPT=totsc/install-1cd-uk.sh PATCHES="totsc/install-patch-uk.sh totsc/install-patch-baldurdash-fix.sh totsc/install-patch-baldurdash-text.sh" WINDOWSFILES="bgmain2.exe baldur.exe config.exe mconvert.exe" @@ -64,7 +64,7 @@ while [ -z "$MINSCRIPT" ]; do ;; "640b61443cc86c434f1b6826e63c0e33" ) FULLGAMENAME="Planescape Torment: 2CD version" - SHORTGAMENAME="pst" + SHORTGAMENAME="planescapetorment" MINSCRIPT=pst/install-2cd-minimal.sh EXTRASCRIPT=pst/install-2cd-extra.sh WINDOWSFILES="torment.exe ereg" @@ -72,7 +72,7 @@ while [ -z "$MINSCRIPT" ]; do ;; "5e8c2075163aca124de4a467fb33063d" ) FULLGAMENAME="Planescape Torment: 4CD version" - SHORTGAMENAME="pst" + SHORTGAMENAME="planescapetorment" MINSCRIPT=pst/install-4cd-minimal.sh EXTRASCRIPT=pst/install-4cd-extra.sh PATCHES="pst/install-patch-official.sh" -- cgit v1.2.3