Better error messages

master
Keith Irwin 2024-04-16 10:44:54 -06:00
parent 9fa79c16e6
commit dbe331c644
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
1 changed files with 2 additions and 2 deletions

4
gdead
View File

@ -63,12 +63,12 @@ URL="https://archive.org/advancedsearch.php?q=collection%3A%28GratefulDead%29${S
# Metadata search
res=$(curl --user-agent "${UA}" --silent "${URL}" | cut -c 3- | head -c-2 | jq -r '.response.docs[0].identifier')
if [ "${res}" == "" ]; then
echo "FATAL: Could not connect to archive.org"
printf 'FATAL: Could not connect to archive.org\n'
exit 4
fi
if [ "${res}" == "null" ]; then
echo "No shows found."
printf 'No shows found for %s\n' "${SHOW_DATE}"
exit 5
fi