[Pkg-xen-devel] [PATCH 08/19] d/shuffle-boot-files: The Great Quotification

Elliott Mitchell ehem+debian at m5p.com
Wed Dec 2 19:50:19 GMT 2020


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 <ehem+debian at m5p.com>
---
 debian/shuffle-boot-files | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

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
-- 


-- 
(\___(\___(\______          --=> 8-) EHM <=--          ______/)___/)___/)
 \BS (    |         ehem+sigmsg at m5p.com  PGP 87145445         |    )   /
  \_CS\   |  _____  -O #include <stddisclaimer.h> O-   _____  |   /  _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445






More information about the Pkg-xen-devel mailing list