diff options
author | Dave Martin <Dave.Martin@arm.com> | 2019-06-07 12:26:22 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2019-07-03 10:34:05 +0100 |
commit | 3baf13c790407140007025a18642f61168768fb8 (patch) | |
tree | d776ddfe8643cae71738c37eed1823ff98763ef6 | |
parent | 534cac245102e05b3af3ea8afff382e7488984da (diff) | |
download | kvmtool-3baf13c790407140007025a18642f61168768fb8.tar.gz |
update_headers.sh: Add missing shell quoting
update_headers.sh can break if the current working directory has a
funny name or if something odd is passed for LINUX_ROOT.
In the interest of cleanliness, quote where appropriate.
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rwxr-xr-x | util/update_headers.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/util/update_headers.sh b/util/update_headers.sh index 2d936468..4ba1b9f8 100755 --- a/util/update_headers.sh +++ b/util/update_headers.sh @@ -11,17 +11,17 @@ if [ "$#" -ge 1 ] then LINUX_ROOT="$1" else - LINUX_ROOT=/lib/modules/$(uname -r)/source + LINUX_ROOT="/lib/modules/$(uname -r)/source" fi -if [ ! -d $LINUX_ROOT/include/uapi/linux ] +if [ ! -d "$LINUX_ROOT/include/uapi/linux" ] then echo "$LINUX_ROOT does not seem to be valid Linux source tree." echo "usage: $0 [path-to-Linux-source-tree]" exit 1 fi -cp $LINUX_ROOT/include/uapi/linux/kvm.h include/linux +cp -- "$LINUX_ROOT/include/uapi/linux/kvm.h" include/linux for arch in arm arm64 mips powerpc x86 do @@ -30,6 +30,6 @@ do arm64) KVMTOOL_PATH=arm/aarch64 ;; *) KVMTOOL_PATH=$arch ;; esac - cp $LINUX_ROOT/arch/$arch/include/uapi/asm/kvm.h \ - $KVMTOOL_PATH/include/asm + cp -- "$LINUX_ROOT/arch/$arch/include/uapi/asm/kvm.h" \ + "$KVMTOOL_PATH/include/asm" done |