From 47723e5108d8b91212d2c6a33fc6284680ecedf6 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 10 Feb 2024 15:31:34 -0600 Subject: [PATCH] Update run.sh --- run.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/run.sh b/run.sh index 5265bba..4cbb0aa 100755 --- a/run.sh +++ b/run.sh @@ -40,7 +40,8 @@ if curl -m 3 -s --head --request GET https://git.schroedercity.com | grep "HTTP 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} -eq 1 ] && echo -en "\e[1A"; + echo -en "\e[0K\r${idsCL[LightCyan]}Updating LinUPx...${idsCL[Default]}" fi git fetch origin master >/dev/null 2>&1 git reset --hard origin/master >/dev/null 2>&1 @@ -56,12 +57,8 @@ 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 - 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 + [ ${udtd} -eq 1 ] && echo -en "\e[1A" + echo -e "\e[0K\r ${idsCL[Green]}No updates available${idsCL[Default]}" echo "" fi