Use unset (#156)

This commit is contained in:
Reto Kromer 2017-12-15 20:32:03 +01:00 committed by Alex Epstein
parent 7e47776b6a
commit 39417507a3
1 changed files with 3 additions and 4 deletions

View File

@ -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