Skip to content

Commit 8763d22

Browse files
powerpc/boot/install.sh: Fix shellcheck warnings
Fix shellcheck warning such as "Double quote to prevent globbing and word splitting." and Use $(...) notation instead of legacy backticks `...`. Tested-by: Venkat Rao Bagalkote <[email protected]> Signed-off-by: Madhavan Srinivasan <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent d40ae90 commit 8763d22

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

arch/powerpc/boot/install.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@
1919
set -e
2020

2121
# this should work for both the pSeries zImage and the iSeries vmlinux.sm
22-
image_name=`basename $2`
22+
image_name=$(basename "$2")
2323

2424

2525
echo "Warning: '${INSTALLKERNEL}' command not available... Copying" \
2626
"directly to $4/$image_name-$1" >&2
2727

28-
if [ -f $4/$image_name-$1 ]; then
29-
mv $4/$image_name-$1 $4/$image_name-$1.old
28+
if [ -f "$4"/"$image_name"-"$1" ]; then
29+
mv "$4"/"$image_name"-"$1" "$4"/"$image_name"-"$1".old
3030
fi
3131

32-
if [ -f $4/System.map-$1 ]; then
33-
mv $4/System.map-$1 $4/System-$1.old
32+
if [ -f "$4"/System.map-"$1" ]; then
33+
mv "$4"/System.map-"$1" "$4"/System-"$1".old
3434
fi
3535

36-
cat $2 > $4/$image_name-$1
37-
cp $3 $4/System.map-$1
36+
cat "$2" > "$4"/"$image_name"-"$1"
37+
cp "$3" "$4"/System.map-"$1"

0 commit comments

Comments
 (0)