diff options
author | Mario Limonciello <mario.limonciello@amd.com> | 2023-11-08 17:13:51 -0600 |
---|---|---|
committer | Mario Limonciello <mario.limonciello@amd.com> | 2023-11-08 17:13:51 -0600 |
commit | 195eae5962588c588ec1ef8d34a716da008afdb1 (patch) | |
tree | 12a53859d9efb1895bd8e3e4790e21d1261ec171 | |
parent | 4c55675d7adaf2aadb39aceeecc65cc86ace6917 (diff) | |
download | linux-firmware-195eae5962588c588ec1ef8d34a716da008afdb1.tar.gz |
Add checks for destination directory being specified
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
-rwxr-xr-x | copy-firmware.sh | 5 |
1 files changed, 5 insertions, 0 deletions
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 |