From: Mario Limonciello Date: Wed, 8 Nov 2023 23:13:51 +0000 (-0600) Subject: Add checks for destination directory being specified X-Git-Tag: 20231111~2^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=195eae5962588c588ec1ef8d34a716da008afdb1;p=linux-firmware.git Add checks for destination directory being specified Signed-off-by: Mario Limonciello --- diff --git a/copy-firmware.sh b/copy-firmware.sh index 3026c216..cca3913b 100755 --- a/copy-firmware.sh +++ b/copy-firmware.sh @@ -64,6 +64,11 @@ while test $# -gt 0; do esac done +if [ -z "$destdir" ]; then + echo "ERROR: destination directory was not specified" + exit 1 +fi + # shellcheck disable=SC2162 # file/folder name can include escaped symbols grep -E '^(RawFile|File):' WHENCE | sed -E -e 's/^(RawFile|File): */\1 /;s/"//g' | while read k f; do test -f "$f" || continue