[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210407053419.449796-3-gregkh@linuxfoundation.org>
Date: Wed, 7 Apr 2021 07:34:01 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Masahiro Yamada <masahiroy@...nel.org>,
Michal Marek <michal.lkml@...kovi.net>
Cc: linux-kbuild@...r.kernel.org, linux-arch@...r.kernel.org,
linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [PATCH 02/20] kbuild: scripts/install.sh: properly quote all variables
A few variables are quoted to handle spaces in directory names, but not
all of them. Properly quote everything so that the kernel build can
handle working correctly with directory names with spaces.
This change makes the script "shellcheck" clean now.
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
scripts/install.sh | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/scripts/install.sh b/scripts/install.sh
index d13ec1c38640..c183d6ddd00c 100644
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -33,21 +33,21 @@ verify "$3"
# User may have a custom install script
-if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi
-if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi
+if [ -x ~/bin/"${INSTALLKERNEL}" ]; then exec ~/bin/"${INSTALLKERNEL}" "$@"; fi
+if [ -x /sbin/"${INSTALLKERNEL}" ]; then exec /sbin/"${INSTALLKERNEL}" "$@"; fi
# Default install - same as make zlilo
-if [ -f $4/vmlinuz ]; then
- mv $4/vmlinuz $4/vmlinuz.old
+if [ -f "$4"/vmlinuz ]; then
+ mv "$4"/vmlinuz "$4"/vmlinuz.old
fi
-if [ -f $4/System.map ]; then
- mv $4/System.map $4/System.old
+if [ -f "$4"/System.map ]; then
+ mv "$4"/System.map "$4"/System.old
fi
-cat $2 > $4/vmlinuz
-cp $3 $4/System.map
+cat "$2" > "$4"/vmlinuz
+cp "$3" "$4"/System.map
if [ -x /sbin/lilo ]; then
/sbin/lilo
--
2.31.1
Powered by blists - more mailing lists