From: Elliott Mitchell Date: Fri, 17 Jul 2020 19:05:25 +0000 (-0700) Subject: d/shuffle-boot-files: The Great Quotification X-Git-Tag: archive/raspbian/4.14.1+11-gb0b734a8b3-1+rpi1^2~75 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b34d4115202a78013e2fd8b83594abc246c57632;p=xen.git d/shuffle-boot-files: The Great Quotification These should originate with the owner of a build system and are unlikely to get hazardous values. This script though *should* work on a system with such a bizzare setup. On general principle, add lots of double-quotes. Signed-off-by: Elliott Mitchell Acked-by: Hans van Kranenburg --- diff --git a/debian/shuffle-boot-files b/debian/shuffle-boot-files index f7492c0c72..683788d40a 100755 --- a/debian/shuffle-boot-files +++ b/debian/shuffle-boot-files @@ -2,13 +2,13 @@ set -e -version=$1; shift -flavour=$1; shift +version="$1"; shift +flavour="$1"; shift t=debian/tmp -hv=xen-hypervisor-$version-$flavour -dest=debian/$hv/boot -mkdir -p $dest +hv="xen-hypervisor-$version-$flavour" +dest="debian/$hv/boot" +mkdir -p "$dest" # The upstream build system puts a pile of needless symlinks in /boot. # @@ -21,11 +21,11 @@ mkdir -p $dest # more useful when the -i386 flavour existed and was coinstallable # with the -amd64 flavour.) -verstring=$(readlink debian/tmp/boot/xen.gz || - readlink debian/tmp/boot/xen) -verstring=${verstring##*/} -verstring=${verstring%.gz} +verstring="$(readlink debian/tmp/boot/xen.gz || + readlink debian/tmp/boot/xen)" +verstring="${verstring##*/}" +verstring="${verstring%.gz}" -for f in `cd $t/boot && find * -type f -print`; do - cp -v $t/boot/$f $dest/${f/$verstring/xen-$version-$flavour} +for f in `cd "$t/boot" && find * -type f -print`; do + cp -v "$t/boot/$f" "$dest/${f/$verstring/xen-$version-$flavour}" done