From ad2ce8beeeb46bca4246ecb62ac4fe715f097e39 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Mon, 5 Jun 2023 14:58:11 +0100 Subject: [PATCH] copy-firmware: silence the last shellcheck warnings Signed-off-by: Emil Velikov Signed-off-by: Josh Boyer --- copy-firmware.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/copy-firmware.sh b/copy-firmware.sh index 31e372ab..40cec04e 100755 --- a/copy-firmware.sh +++ b/copy-firmware.sh @@ -10,6 +10,7 @@ prune=no while test $# -gt 0; do case $1 in -v | --verbose) + # shellcheck disable=SC2209 verbose=echo shift ;; @@ -21,7 +22,7 @@ while test $# -gt 0; do *) if test "x$destdir" != "x"; then - echo "ERROR: unknown command-line options: $@" + echo "ERROR: unknown command-line options: $*" exit 1 fi @@ -31,6 +32,7 @@ while test $# -gt 0; do esac done +# shellcheck disable=SC2162 # file/folder name can include escaped symbols grep '^File:' WHENCE | sed -e 's/^File: *//g;s/"//g' | while read f; do test -f "$f" || continue $verbose "copying file $f" @@ -38,6 +40,7 @@ grep '^File:' WHENCE | sed -e 's/^File: *//g;s/"//g' | while read f; do cp -d "$f" "$destdir/$f" done +# shellcheck disable=SC2162 # file/folder name can include escaped symbols grep -E '^Link:' WHENCE | sed -e 's/^Link: *//g;s/-> //g' | while read f d; do if test -L "$f"; then test -f "$destdir/$f" && continue