]> git.proxmox.com Git - mirror_linux-firmware.git/commitdiff
Add checks for destination directory being specified
authorMario Limonciello <mario.limonciello@amd.com>
Wed, 8 Nov 2023 23:13:51 +0000 (17:13 -0600)
committerMario Limonciello <mario.limonciello@amd.com>
Wed, 8 Nov 2023 23:13:51 +0000 (17:13 -0600)
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
copy-firmware.sh

index 3026c216ea6d9132b4342e59e6a2e6e987191479..cca3913bd944c12684f90411463ec036e1fe93ef 100755 (executable)
@@ -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