From f5acadb88b5ed5bd3fe22707484f280475bb37ee Mon Sep 17 00:00:00 2001 From: Chris AG4YN Date: Sun, 12 Jan 2025 18:09:44 +0000 Subject: [PATCH] Wrap potentially empty variables with quotes to avoid == error. Several if statements were throwing errors due to == checks not having 2 things to compare if a variable was empty. Wrapping with double quotes eliminates this in BASH. --- hamdb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 hamdb diff --git a/hamdb b/hamdb old mode 100644 new mode 100755 index 6c19d18..9f62bfa --- a/hamdb +++ b/hamdb @@ -56,17 +56,17 @@ WGET_HEADER="Accept: text/html" WGET_USER_AGENT="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko)" # if today is Monday, get the full file, otherwise get a smaller daily update file -if [ ${DAY} == sun ]; then +if [ "${DAY}" == sun ]; then FULLIMPORT=1 else FULLIMPORT=0 fi -if [ ${1} == full ]; then +if [ "${1}" == "full" ]; then FULLIMPORT=1 fi -if [ ${1} == getfccfile ]; then +if [ "${1}" == "getfccfile" ]; then FULLIMPORT=1 fi