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

Hans van Kranenburg hans at knorrie.org
Fri Dec 4 21:18:19 GMT 2020


On 7/17/20 9:05 PM, Elliott Mitchell wrote:
> 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>
I like the title. :-) And yes, explicit is better, even only when it
helps reducing later complaints.

Acked-by: Hans van Kranenburg <hans at knorrie.org>

Added to knorrie/sid, thanks.
Hans

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




More information about the Pkg-xen-devel mailing list