From 39417507a3ab585265e76a4784e3cb212287ac84 Mon Sep 17 00:00:00 2001 From: Reto Kromer Date: Fri, 15 Dec 2017 20:32:03 +0100 Subject: [PATCH] Use unset (#156) --- weather/weather | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/weather/weather b/weather/weather index 5b9771c..f5d8dfe 100755 --- a/weather/weather +++ b/weather/weather @@ -4,13 +4,13 @@ currentVersion="1.20.0" #This version variable should not have a v but should contain all other characters ex Github release tag is v1.2.4 currentVersion is 1.2.4 LANG="${LANG:-en}" locale=$(echo $LANG | cut -c1-2) -configuredClient="" -if [[ $(echo $locale | grep -Eo "[a-z A-Z]*" | wc -c) != 3 ]];then locale="en";fi +unset configuredClient +if [[ $(echo $locale | grep -Eo "[a-z A-Z]*" | wc -c) != 3 ]]; then locale="en"; fi ## This function determines which http get tool the system has installed and returns an error if there isnt one getConfiguredClient() { - if command -v curl &>/dev/null; then + if command -v curl &>/dev/null; then configuredClient="curl" elif command -v wget &>/dev/null; then configuredClient="wget" @@ -132,7 +132,6 @@ EOF getConfiguredClient || exit 1 - while getopts "uvh" opt; do case "$opt" in \?) echo "Invalid option: -$OPTARG" >&2