From a45222f981eab7f3247dc4250a332ecdcb427cd2 Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 1 Jun 2009 01:32:49 +0100 Subject: Safely escaped more variables Following Nick Daly's lead... --- auto-installer.sh | 12 ++++++------ iwd/install-2cd-uk-extra.sh | 2 +- iwd/install-2cd-uk-minimal.sh | 16 ++++++++-------- iwd/install-patch-uk-fix.sh | 8 ++++---- iwd/install-patch-us.sh | 6 +++--- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/auto-installer.sh b/auto-installer.sh index 2a74442..58b0c86 100755 --- a/auto-installer.sh +++ b/auto-installer.sh @@ -82,8 +82,8 @@ while [ -z "$MINSCRIPT" ]; do $PST_2CD_MD5 ) FULLGAMENAME="Planescape Torment: 2CD version" SHORTGAMENAME="planescapetorment" - MINSCRIPT=pst/install-2cd-minimal.sh - EXTRASCRIPT=pst/install-2cd-extra.sh + 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 @@ -91,8 +91,8 @@ while [ -z "$MINSCRIPT" ]; do $PST_4CD_MD5 ) FULLGAMENAME="Planescape Torment: 4CD version" SHORTGAMENAME="planescapetorment" - MINSCRIPT=pst/install-4cd-minimal.sh - EXTRASCRIPT=pst/install-4cd-extra.sh + 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" WINDOWSFILES="torment.exe ereg" CDNO=4 @@ -100,8 +100,8 @@ while [ -z "$MINSCRIPT" ]; do $IWD_2CD_UK_MD5 ) FULLGAMENAME="Icewind Dale 2CD UK version" SHORTGAMENAME="icewinddale" - MINSCRIPT=iwd/install-2cd-uk-minimal.sh - EXTRASCRIPT=iwd/install-2cd-uk-extra.sh + MINSCRIPT="iwd/install-2cd-uk-minimal.sh" + EXTRASCRIPT="iwd/install-2cd-uk-extra.sh" PATCHES="iwd/install-patch-uk-fix.sh iwd/install-patch-us.sh" WINDOWSFILES="3dfx.dll config.exe icewind.ini keymap.ini language.ini mpicewnd.mpi" CDNO=2 diff --git a/iwd/install-2cd-uk-extra.sh b/iwd/install-2cd-uk-extra.sh index 4c2ca8e..22ee2dd 100755 --- a/iwd/install-2cd-uk-extra.sh +++ b/iwd/install-2cd-uk-extra.sh @@ -26,6 +26,6 @@ CD2="2356e87971437f78bce8164b1dc066fa" getcd 2 $CD2 AUTORUN.DAT -copylower "$CDMOUNT/CD2/DATA/" "$TARGETDIR"/data || die +copylower "${CDMOUNT}/CD2/DATA/" "${TARGETDIR}/data" || die setperms "$TARGETDIR" diff --git a/iwd/install-2cd-uk-minimal.sh b/iwd/install-2cd-uk-minimal.sh index 5438e3b..10cd533 100755 --- a/iwd/install-2cd-uk-minimal.sh +++ b/iwd/install-2cd-uk-minimal.sh @@ -28,16 +28,16 @@ getcd 1 $IWD_2CD_UK_MD5 data1.cab mkdir -p "$TARGETDIR" || die -unshield -L x $CDMOUNT/data1.cab -d "$TARGETDIR" || die +unshield -L x "${CDMOUNT}/data1.cab" -d "$TARGETDIR" || die -cp -R "$TARGETDIR"/minimum_compressed/* "$TARGETDIR" || die -rm -r "$TARGETDIR"/minimum_compressed || die -rm -r "$TARGETDIR"/register || die +cp -R "${TARGETDIR}/minimum_compressed/"* "$TARGETDIR" || die +rm -r "${TARGETDIR}/minimum_compressed" || die +rm -r "${TARGETDIR}/register" || die -cp -R "$TARGETDIR"/recommended_compressed/data/* "$TARGETDIR"/data || die -rm -r "$TARGETDIR"/recommended_compressed || die +cp -R "${TARGETDIR}/recommended_compressed/data/"* "${TARGETDIR}/data" || die +rm -r "${TARGETDIR}/recommended_compressed" || die -copylower $CDMOUNT/Data "$TARGETDIR"/data || die -copylower $CDMOUNT/ICEWIND.ICO "$TARGETDIR" || die +copylower "${CDMOUNT}/Data" "${TARGETDIR}/data" || die +copylower "${CDMOUNT}/ICEWIND.ICO" "$TARGETDIR" || die setperms "$TARGETDIR" diff --git a/iwd/install-patch-uk-fix.sh b/iwd/install-patch-uk-fix.sh index 024adbb..27b1711 100755 --- a/iwd/install-patch-uk-fix.sh +++ b/iwd/install-patch-uk-fix.sh @@ -25,8 +25,8 @@ patch_url="http://www.sorcerers.net/Games2/IWD/iwdukpatch.exe" patch_name="iwdukpatch.exe" scriptdir="$(dirname $0)"/.. -source "$scriptdir/includes/generic-includes.sh" -source "$scriptdir/includes/patch-includes.sh" +source "${scriptdir}/includes/generic-includes.sh" +source "${scriptdir}/includes/patch-includes.sh" parseargs "$@" @@ -36,8 +36,8 @@ setuptmp getpatch $patch_url -cabextract -L -s $TMPDIR/$patch_name -d $TMPDIR || diesoftly -cp -R $TMPDIR/override/* "$TARGETDIR"/override || diesoftly +cabextract -L -s "${TMPDIR}/${patch_name}" -d "$TMPDIR" || diesoftly +cp -R "${TMPDIR}/override/"* "${TARGETDIR}/override" || diesoftly cleanuptmp setperms "$TARGETDIR" diff --git a/iwd/install-patch-us.sh b/iwd/install-patch-us.sh index f17c429..1bea57c 100755 --- a/iwd/install-patch-us.sh +++ b/iwd/install-patch-us.sh @@ -35,9 +35,9 @@ setuptmp getpatch $patch_url -cabextract -L -s $TMPDIR/$patch_name -d $TMPDIR || diesoftly -cp -R $TMPDIR/override/* "$TARGETDIR"/override || diesoftly -cp -R $TMPDIR/scripts/* "$TARGETDIR"/scripts || diesoftly +cabextract -L -s "${TMPDIR}/${patch_name}" -d "$TMPDIR" || diesoftly +cp -R "${TMPDIR}/override/"* "${TARGETDIR}/override" || diesoftly +cp -R "${TMPDIR}/scripts/"* "${TARGETDIR}/scripts" || diesoftly cleanuptmp setperms "$TARGETDIR" -- cgit v1.2.3