From dbe331c6448a493c5f36891216295c02f9966189 Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Tue, 16 Apr 2024 10:44:54 -0600 Subject: [PATCH] Better error messages --- gdead | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdead b/gdead index 7f98b76..90bf16a 100755 --- a/gdead +++ b/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