copy-firmware: silence the last shellcheck warnings

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Josh Boyer <jwboyer@kernel.org>
This commit is contained in:
Emil Velikov 2023-06-05 14:58:11 +01:00 committed by Josh Boyer
parent 67bf50e72c
commit ad2ce8beee
No known key found for this signature in database
GPG Key ID: A31B6BD72486CFD6

View File

@ -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