Better error messages
parent
9fa79c16e6
commit
dbe331c644
4
gdead
4
gdead
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue