summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2009-04-17 17:10:07 +0100
committerNick White <git@njw.me.uk>2009-04-17 17:10:07 +0100
commit3603dfcb5d12e19b75dccbc2a621adb83fd7adea (patch)
tree4db93b4e5fb98a380475b9edd5c0054a0d51302b
parentc2c29265815ddfa73d77276bc2fd5a53be08e608 (diff)
downloadgemrb-gameinstallers-0.1.1.tar.bz2
gemrb-gameinstallers-0.1.1.zip
Move overridden die for patch to new general function: diesoftlyv0.1.1
-rwxr-xr-xbg1/install-patch-baldurdash-fix.sh2
-rwxr-xr-xbg1/install-patch-baldurdash-text.sh4
-rwxr-xr-xbg1/install-patch-intl.sh6
-rwxr-xr-xbg1/install-patch-us.sh6
-rw-r--r--includes/generic-includes.sh9
-rw-r--r--includes/patch-includes.sh10
-rwxr-xr-xpst/install-patch-official.sh6
-rwxr-xr-xtotsc/install-patch-baldurdash-fix.sh2
-rwxr-xr-xtotsc/install-patch-baldurdash-text.sh4
-rwxr-xr-xtotsc/install-patch-intl.sh6
-rwxr-xr-xtotsc/install-patch-uk.sh6
-rwxr-xr-xtotsc/install-patch-us.sh6
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"