From 4f837e2cef827e6f700c5ae180551510ffedc718 Mon Sep 17 00:00:00 2001 From: Nick White Date: Sun, 16 Aug 2009 02:25:28 +0100 Subject: Work around unshield bug Basically, if extracting to a directory which was not itself lowercase, unshield would fail. This patch cds to the directory first, to work around the issue. http://sourceforge.net/tracker/?func=detail&aid=2801016&group_id=30550&atid=399601 --- bg1/install-1cd-totsc-uk.sh | 4 +++- bg1/install-3cd-minimal.sh | 6 ++++-- bg1/install-5cd-minimal.sh | 4 +++- bg1/install-patch-intl.sh | 4 +++- bg1/install-patch-totsc-intl.sh | 4 +++- bg1/install-patch-totsc-uk.sh | 4 +++- bg1/install-patch-totsc-us.sh | 4 +++- bg1/install-patch-us.sh | 4 +++- bg2/install-soa-4cd-us-minimal.sh | 4 +++- bg2/install-tob-1cd-us-minimal.sh | 4 +++- iwd/install-2cd-minimal.sh | 4 +++- iwd2/install-2cd-us-minimal.sh | 4 +++- iwd2/install-patch-us.sh | 4 +++- pst/install-2cd-extra.sh | 7 +++++-- pst/install-2cd-minimal.sh | 7 +++++-- pst/install-4cd-minimal.sh | 4 +++- pst/install-patch-official.sh | 4 +++- 17 files changed, 56 insertions(+), 20 deletions(-) diff --git a/bg1/install-1cd-totsc-uk.sh b/bg1/install-1cd-totsc-uk.sh index 49270fd..11780c3 100755 --- a/bg1/install-1cd-totsc-uk.sh +++ b/bg1/install-1cd-totsc-uk.sh @@ -28,7 +28,9 @@ getcd 1 $BG1_TOTSC_1CD_UK_MD5 data1.cab mkdir -p "$TARGETDIR" || die -unshield -d "$TARGETDIR" -L x "${CDMOUNT}/data1.cab" || die +# work around unshield bug (#2801016 in SynCE project) +#unshield -d "$TARGETDIR" -L x "${CDMOUNT}/data1.cab" || die +cd "$TARGETDIR" && unshield -d . -L x "${CDMOUNT}/data1.cab" || die cp "${CDMOUNT}/dialog.tlk" "$TARGETDIR" || die diff --git a/bg1/install-3cd-minimal.sh b/bg1/install-3cd-minimal.sh index 24f9dd8..1e770a4 100755 --- a/bg1/install-3cd-minimal.sh +++ b/bg1/install-3cd-minimal.sh @@ -30,7 +30,9 @@ mkdir -p "$TARGETDIR" || die cp "${CDMOUNT}/dialog.tlk" "$TARGETDIR" || die -unshield -d "$TARGETDIR" -L x "${CDMOUNT}/data1.cab" || die +# work around unshield bug (#2801016 in SynCE project) +#unshield -d "$TARGETDIR" -L x "${CDMOUNT}/data1.cab" || die +cd "$TARGETDIR" && unshield -d . -L x "${CDMOUNT}/data1.cab" || die move_and_remove "${TARGETDIR}/minimumdata" "${TARGETDIR}" move_and_remove "${TARGETDIR}/english" "${TARGETDIR}" @@ -48,4 +50,4 @@ cp "${CDMOUNT}/Manual/TotscManual.pdf" "${TARGETDIR}/manual/" || die cp "${CDMOUNT}/baldur.ico" "$TARGETDIR" || die -teardown "$TARGETDIR" \ No newline at end of file +teardown "$TARGETDIR" diff --git a/bg1/install-5cd-minimal.sh b/bg1/install-5cd-minimal.sh index ad8c681..3ae2c88 100755 --- a/bg1/install-5cd-minimal.sh +++ b/bg1/install-5cd-minimal.sh @@ -30,7 +30,9 @@ mkdir -p "$TARGETDIR" || die copylower "${CDMOUNT}/dialog.tlk" "$TARGETDIR" || die -unshield -d "$TARGETDIR" -L x "${CDMOUNT}/data1.cab" || die +# work around unshield bug (#2801016 in SynCE project) +#unshield -d "$TARGETDIR" -L x "${CDMOUNT}/data1.cab" || die +cd "$TARGETDIR" && unshield -d . -L x "${CDMOUNT}/data1.cab" || die move_and_remove "${TARGETDIR}/minimumdata" "$TARGETDIR" move_and_remove "${TARGETDIR}/english" "$TARGETDIR" diff --git a/bg1/install-patch-intl.sh b/bg1/install-patch-intl.sh index 745ee38..500b675 100755 --- a/bg1/install-patch-intl.sh +++ b/bg1/install-patch-intl.sh @@ -36,7 +36,9 @@ setuptmp getpatch $patch_url unzip "${TMPDIR}/${patch_name}" -d "${TMPDIR}" || diesoftly -unshield -g "$LANGUAGE" -d "$TMPDIR" -L x "${TMPDIR}/data1.cab" || diesoftly +# work around unshield bug (#2801016 in SynCE project) +#unshield -g "$LANGUAGE" -d "$TMPDIR" -L x "${TMPDIR}/data1.cab" || diesoftly +cd "$TMPDIR" && unshield -g "$LANGUAGE" -d . -L x "${TMPDIR}/data1.cab" || diesoftly LANGUAGE="$(echo $LANGUAGE|tr A-Z a-z|tr ' ' _)" # alter formatting cp -R "${TMPDIR}/${LANGUAGE}/"* "$TARGETDIR" || diesoftly diff --git a/bg1/install-patch-totsc-intl.sh b/bg1/install-patch-totsc-intl.sh index 337aa1d..01ecd46 100755 --- a/bg1/install-patch-totsc-intl.sh +++ b/bg1/install-patch-totsc-intl.sh @@ -36,7 +36,9 @@ setuptmp getpatch $patch_url cabextract -L "${TMPDIR}/${patch_name}" -d "$TMPDIR" || diesoftly -unshield -d "$TMPDIR" -L x "${TMPDIR}/data1.cab" || diesoftly +# work around unshield bug (#2801016 in SynCE project) +#unshield -d "$TMPDIR" -L x "${TMPDIR}/data1.cab" || diesoftly +cd "$TMPDIR" && unshield -d . -L x "${TMPDIR}/data1.cab" || diesoftly cp -R "${TMPDIR}/minimumdata/"* "$TARGETDIR" || diesoftly diff --git a/bg1/install-patch-totsc-uk.sh b/bg1/install-patch-totsc-uk.sh index 4a7727d..260cf5e 100755 --- a/bg1/install-patch-totsc-uk.sh +++ b/bg1/install-patch-totsc-uk.sh @@ -36,7 +36,9 @@ setuptmp getpatch $patch_url cabextract -L "${TMPDIR}/${patch_name}" -d "$TMPDIR" || diesoftly -unshield -d "$TMPDIR" -L x "${TMPDIR}/data1.cab" || diesoftly +# work around unshield bug (#2801016 in SynCE project) +#unshield -d "$TMPDIR" -L x "${TMPDIR}/data1.cab" || diesoftly +cd "$TMPDIR" && unshield -d . -L x "${TMPDIR}/data1.cab" || diesoftly cp -R "${TMPDIR}/minimumdata/"* "$TARGETDIR" || diesoftly diff --git a/bg1/install-patch-totsc-us.sh b/bg1/install-patch-totsc-us.sh index f01e4ec..8a47f79 100755 --- a/bg1/install-patch-totsc-us.sh +++ b/bg1/install-patch-totsc-us.sh @@ -36,7 +36,9 @@ setuptmp getpatch $patch_url cabextract -L "${TMPDIR}/${patch_name}" -d "$TMPDIR" || diesoftly -unshield -d "$TMPDIR" -L x "${TMPDIR}/data1.cab" || diesoftly +# work around unshield bug (#2801016 in SynCE project) +#unshield -d "$TMPDIR" -L x "${TMPDIR}/data1.cab" || diesoftly +cd "$TMPDIR" && unshield -d . -L x "${TMPDIR}/data1.cab" || diesoftly cp -R "${TMPDIR}/minimumdata/"* "$TARGETDIR" || diesoftly diff --git a/bg1/install-patch-us.sh b/bg1/install-patch-us.sh index 5ed2d8e..45aca35 100755 --- a/bg1/install-patch-us.sh +++ b/bg1/install-patch-us.sh @@ -36,7 +36,9 @@ setuptmp getpatch $patch_url cabextract -L "${TMPDIR}/${patch_name}" -d "$TMPDIR" || diesoftly -unshield -d "$TMPDIR" -L x "${TMPDIR}/data1.cab" || diesoftly +# work around unshield bug (#2801016 in SynCE project) +#unshield -d "$TMPDIR" -L x "${TMPDIR}/data1.cab" || diesoftly +cd "$TMPDIR" && unshield -d . -L x "${TMPDIR}/data1.cab" || diesoftly cp -R "${TMPDIR}/english/"* "$TARGETDIR" || diesoftly diff --git a/bg2/install-soa-4cd-us-minimal.sh b/bg2/install-soa-4cd-us-minimal.sh index 7833dca..ddf51e2 100755 --- a/bg2/install-soa-4cd-us-minimal.sh +++ b/bg2/install-soa-4cd-us-minimal.sh @@ -33,7 +33,9 @@ mkdir -p "${TARGETDIR}/portraits" || die cp "${CDMOUNT}/baldur.ico" "$TARGETDIR" || die -unshield -L x "${CDMOUNT}/data1.cab" -d "$TARGETDIR" || die +# work around unshield bug (#2801016 in SynCE project) +#unshield -L x "${CDMOUNT}/data1.cab" -d "$TARGETDIR" || die +cd "$TARGETDIR" && unshield -d . -L x "${CDMOUNT}/data1.cab" || die rm -r "${TARGETDIR}/_"* # remove all the the fake directories. diff --git a/bg2/install-tob-1cd-us-minimal.sh b/bg2/install-tob-1cd-us-minimal.sh index 67aa795..147e9a2 100755 --- a/bg2/install-tob-1cd-us-minimal.sh +++ b/bg2/install-tob-1cd-us-minimal.sh @@ -37,7 +37,9 @@ then # TODO ask user to run the appropriate preinstaller. fi -unshield -d "$TARGETDIR" -L x "${CDMOUNT}/data1.cab" || die +# work around unshield bug (#2801016 in SynCE project) +#unshield -d "$TARGETDIR" -L x "${CDMOUNT}/data1.cab" || die +cd "$TARGETDIR" && unshield -d . -L x "${CDMOUNT}/data1.cab" || die rm -r "${TARGETDIR}/_"* # remove all the the fake directories. diff --git a/iwd/install-2cd-minimal.sh b/iwd/install-2cd-minimal.sh index 1b60b85..be9a7e4 100755 --- a/iwd/install-2cd-minimal.sh +++ b/iwd/install-2cd-minimal.sh @@ -28,7 +28,9 @@ getcd 1 $IWD_2CD_UK_MD5 data1.cab mkdir -p "$TARGETDIR" || die -unshield -d "$TARGETDIR" -L x "${CDMOUNT}/data1.cab" || die +# work around unshield bug (#2801016 in SynCE project) +#unshield -d "$TARGETDIR" -L x "${CDMOUNT}/data1.cab" || die +cd "$TARGETDIR" && unshield -d . -L x "${CDMOUNT}/data1.cab" || die move_and_remove "${TARGETDIR}/minimum_compressed/" "$TARGETDIR" move_and_remove "${TARGETDIR}/recommended_compressed/data/" "${TARGETDIR}/data" diff --git a/iwd2/install-2cd-us-minimal.sh b/iwd2/install-2cd-us-minimal.sh index 5af6459..a402b53 100755 --- a/iwd2/install-2cd-us-minimal.sh +++ b/iwd2/install-2cd-us-minimal.sh @@ -28,7 +28,9 @@ getcd 1 $IWD2_2CD_US_MD5 data1.cab mkdir -p "$TARGETDIR" || die -unshield -d "$TARGETDIR" -L x "${CDMOUNT}/data1.cab" || die +# work around unshield bug (#2801016 in SynCE project) +#unshield -d "$TARGETDIR" -L x "${CDMOUNT}/data1.cab" || die +cd "$TARGETDIR" && unshield -d . -L x "${CDMOUNT}/data1.cab" || die move_and_remove "${TARGETDIR}/minimum_compressed_-_us_english/" "$TARGETDIR" || die move_and_remove "${TARGETDIR}/minimum_compressed_-_language_independent/" "$TARGETDIR" || die diff --git a/iwd2/install-patch-us.sh b/iwd2/install-patch-us.sh index 2528e44..83b0b37 100755 --- a/iwd2/install-patch-us.sh +++ b/iwd2/install-patch-us.sh @@ -35,7 +35,9 @@ setuptmp getpatch $patch_url cabextract -L "${TMPDIR}/${patch_name}" -d "$TMPDIR" || diesoftly -unshield -d "$TMPDIR" -L x "${TMPDIR}/disk1/data1.cab" || diesoftly +# work around unshield bug (#2801016 in SynCE project) +#unshield -d "$TMPDIR" -L x "${TMPDIR}/disk1/data1.cab" || diesoftly +cd "$TMPDIR" && unshield -d . -L x "${TMPDIR}/disk1/data1.cab" || die cp -R "${TMPDIR}/minimum_compressed_-_language_independent/override/"* "${TARGETDIR}"/override || diesoftly cp -R "${TMPDIR}/minimum_compressed_-_language_independent/scripts/"* "${TARGETDIR}"/scripts || diesoftly diff --git a/pst/install-2cd-extra.sh b/pst/install-2cd-extra.sh index c166cfe..b4cc21b 100755 --- a/pst/install-2cd-extra.sh +++ b/pst/install-2cd-extra.sh @@ -28,8 +28,11 @@ CD2="610d9f6354be741b09fc25b5e9645328" getcd 1 "$PST_2CD_MD5" data1.cab -unshield -d "$TARGETDIR" -g OtherData -L x "${CDMOUNT}/data1.cab" || die -unshield -d "$TARGETDIR" -g OtherData -L x "${CDMOUNT}/data2.cab" || die +# work around unshield bug (#2801016 in SynCE project) +#unshield -d "$TARGETDIR" -g OtherData -L x "${CDMOUNT}/data1.cab" || die +#unshield -d "$TARGETDIR" -g OtherData -L x "${CDMOUNT}/data2.cab" || die +cd "$TARGETDIR" && unshield -d . -g OtherData -L x "${CDMOUNT}/data1.cab" || die +cd "$TARGETDIR" && unshield -d . -g OtherData -L x "${CDMOUNT}/data2.cab" || die mv "${TARGETDIR}/otherdata/"* "$TARGETDIR" || die rmdir "${TARGETDIR}/otherdata" || die diff --git a/pst/install-2cd-minimal.sh b/pst/install-2cd-minimal.sh index 7f8fd18..73464fb 100755 --- a/pst/install-2cd-minimal.sh +++ b/pst/install-2cd-minimal.sh @@ -28,8 +28,11 @@ getcd 1 $PST_2CD_MD5 data1.cab mkdir -p "$TARGETDIR" || die -unshield -d "$TARGETDIR" -g MinimumData -L x "${CDMOUNT}/data1.cab" || die -unshield -d "$TARGETDIR" -g MinimumData -L x "${CDMOUNT}/data2.cab" || die +# work around unshield bug (#2801016 in SynCE project) +#unshield -d "$TARGETDIR" -g MinimumData -L x "${CDMOUNT}/data1.cab" || die +#unshield -d "$TARGETDIR" -g MinimumData -L x "${CDMOUNT}/data2.cab" || die +cd "$TARGETDIR" && unshield -d . -g MinimumData -L x "${CDMOUNT}/data1.cab" || die +cd "$TARGETDIR" && unshield -d . -g MinimumData -L x "${CDMOUNT}/data2.cab" || die cp "${CDMOUNT}/Manual/Torment.pdf" "${TARGETDIR}/manual.pdf" || die cp "${CDMOUNT}/Torment.ico" "${TARGETDIR}/torment.ico" || die diff --git a/pst/install-4cd-minimal.sh b/pst/install-4cd-minimal.sh index 46ec381..6bd5711 100755 --- a/pst/install-4cd-minimal.sh +++ b/pst/install-4cd-minimal.sh @@ -28,7 +28,9 @@ getcd 1 $PST_4CD_MD5 data1.cab mkdir -p "$TARGETDIR" || die -unshield -d "$TARGETDIR" -L x "${CDMOUNT}/data1.cab" || die +# work around unshield bug (#2801016 in SynCE project) +#unshield -d "$TARGETDIR" -L x "${CDMOUNT}/data1.cab" || die +cd "$TARGETDIR" && unshield -d . -L x "${CDMOUNT}/data1.cab" || die move_and_remove "${TARGETDIR}/program_executable_files/" "$TARGETDIR" diff --git a/pst/install-patch-official.sh b/pst/install-patch-official.sh index a924f33..cfa576d 100755 --- a/pst/install-patch-official.sh +++ b/pst/install-patch-official.sh @@ -36,7 +36,9 @@ setuptmp getpatch $patch_url cabextract -L "${TMPDIR}/${patch_name}" -d "$TMPDIR" || diesoftly -unshield -d "$TMPDIR" -L x "${TMPDIR}/data1.cab" || diesoftly +# work around unshield bug (#2801016 in SynCE project) +#unshield -d "$TMPDIR" -L x "${TMPDIR}/data1.cab" || diesoftly +cd "${TMPDIR}" && unshield -d . -L x "${TMPDIR}/data1.cab" || diesoftly copylower "${TMPDIR}/program_executable_files/" "$TARGETDIR" || diesoftly -- cgit v1.2.3