From 07fa14725e0faef5aa410c57f7279b09c2bad5a5 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 10 Feb 2024 15:30:01 -0600 Subject: [PATCH] Update run.sh --- run.sh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/run.sh b/run.sh index c05b012..5265bba 100755 --- a/run.sh +++ b/run.sh @@ -12,7 +12,7 @@ if curl -m 3 -s --head --request GET https://git.schroedercity.com | grep "HTTP if [ "${1}" != "runup" ]; then echo -en "${idsCL[LightCyan]}Checking for updates...${idsCL[Default]}" echo "" - udtd=false + udtd=0 fi if [ "${1}" != "runup" ]; then @@ -24,7 +24,7 @@ if curl -m 3 -s --head --request GET https://git.schroedercity.com | grep "HTTP if [ "${1}" != "runup" ]; then echo -en "\e[1A"; echo -en "\e[0K\r${idsCL[LightCyan]}Updating iDSSYS-Defaults...${idsCL[Default]}" - udtd=true + udtd=1 fi git fetch origin master >/dev/null 2>&1 git reset --hard origin/master >/dev/null 2>&1 @@ -36,15 +36,11 @@ if curl -m 3 -s --head --request GET https://git.schroedercity.com | grep "HTTP fi fi fi - if [ -d /opt/idssys/LinUPx ]; then - cd /opt/idssys/LinUPx - else - cd /opt/idssys/linupx - fi + + cd /opt/idssys/linupx if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then if [ "${1}" != "runup" ]; then echo -en "${idsCL[LightCyan]}Updating LinUPx...${idsCL[Default]}" - udtd=true fi git fetch origin master >/dev/null 2>&1 git reset --hard origin/master >/dev/null 2>&1 @@ -60,9 +56,12 @@ if curl -m 3 -s --head --request GET https://git.schroedercity.com | grep "HTTP echo -e " ${idsCL[Green]}Updated to v${VERS}${idsCL[Default]}" fi elif [ "${1}" != "runup" ]; then - # echo -en "\e[1A"; - # echo -e "\e[0K\r ${idsCL[Green]}No updates available${idsCL[Default]}" - echo -e "${idsCL[Green]}No updates available${idsCL[Default]}" + if [ ${udtd} -eq 1 ]; then + echo -en "\e[1A"; + echo -e "\e[0K\r ${idsCL[Green]}No updates available${idsCL[Default]}" + else + echo -e "${idsCL[Green]}No updates available${idsCL[Default]}" + fi echo "" fi