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... --- 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 +++--- 4 files changed, 16 insertions(+), 16 deletions(-) (limited to 'iwd') 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