[PATCH 6/6] powerpc/boot/install.sh: Fix shellcheck warnings
Stephen Rothwell
sfr at canb.auug.org.au
Tue Apr 22 23:46:49 AEST 2025
Hi Madhavan,
On Tue, 22 Apr 2025 18:40:40 +0530 Madhavan Srinivasan <maddy at linux.ibm.com> wrote:
>
> -if [ -f $4/$image_name-$1 ]; then
> - mv $4/$image_name-$1 $4/$image_name-$1.old
> +if [ -f "$4"/"$image_name"-"$1" ]; then
> + mv "$4"/"$image_name"-"$1" "$4"/"$image_name"-"$1".old
"$4/$image_name-$1" is just as correct (and similar elsewhere).
> fi
>
> -if [ -f $4/System.map-$1 ]; then
> - mv $4/System.map-$1 $4/System-$1.old
> +if [ -f "$4"/System.map-"$1" ]; then
> + mv "$4"/System.map-"$1" "$4"/System-"$1".old
> fi
>
> -cat $2 > $4/$image_name-$1
> -cp $3 $4/System.map-$1
> +cat "$2" > "$4"/"$image_name"-"$1"
> +cp "$3" "$4"/System.map-"$1"
--
Cheers,
Stephen Rothwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20250422/17ef7526/attachment.sig>
More information about the Linuxppc-dev
mailing list