Add checks for destination directory being specified

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
This commit is contained in:
Mario Limonciello 2023-11-08 17:13:51 -06:00
parent 4c55675d7a
commit 195eae5962

View File

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