From: Hans van Kranenburg Date: Sat, 16 Jan 2021 18:34:04 +0000 (+0100) Subject: d/shuffle-boot-files: make it POSIX compliant X-Git-Tag: archive/raspbian/4.14.1+11-gb0b734a8b3-1+rpi1^2~48 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=353140bef3860e270830833e40c9bb24f891a931;p=xen.git d/shuffle-boot-files: make it POSIX compliant We want to use sh instead of bash for this program, so we have to get rid of the back ticks and the ${//} substitution, which is a bash extension. Based on a patch by Elliott Mitchell. Signed-off-by: Hans van Kranenburg --- diff --git a/debian/shuffle-boot-files b/debian/shuffle-boot-files index 683788d40a..5268c2879b 100755 --- a/debian/shuffle-boot-files +++ b/debian/shuffle-boot-files @@ -23,9 +23,12 @@ mkdir -p "$dest" verstring="$(readlink debian/tmp/boot/xen.gz || readlink debian/tmp/boot/xen)" -verstring="${verstring##*/}" +verstring="${verstring##*xen-}" 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}" +find "$t/boot" -type f -print | while read f; do + basename="${f#$t/boot/}" + head="${basename%$verstring*}" + tail="${basename#*$verstring}" + cp -v "$f" "${dest}/${head}${version}-${flavour}${tail}" done