From f8045fa26ba530078fab53217be2114dbf7a73ba Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sat, 10 Feb 2024 15:23:38 -0600 Subject: [PATCH] update --- defaults.inc | 2 +- run.sh | 43 +++++++++++++++++++++---------------------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/defaults.inc b/defaults.inc index 3b84f57..c3c5446 100755 --- a/defaults.inc +++ b/defaults.inc @@ -2,7 +2,7 @@ action="$1" FOLDER='/opt/idssys/linupx' -VERS='6.60.24-02102024' +VERS='6.60.25-02102024' IPERFVER="3.15" diff --git a/run.sh b/run.sh index d371db8..8dd35c3 100755 --- a/run.sh +++ b/run.sh @@ -23,7 +23,7 @@ if curl -m 3 -s --head --request GET https://git.schroedercity.com | grep "HTTP 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 "\e[1A"; - echo -e "${idsCL[LightCyan]}Updating iDSSYS-Defaults...${idsCL[Default]}" + echo -en "${idsCL[LightCyan]}Updating iDSSYS-Defaults...${idsCL[Default]}" udtd=true fi git fetch origin master >/dev/null 2>&1 @@ -32,6 +32,7 @@ if curl -m 3 -s --head --request GET https://git.schroedercity.com | grep "HTTP git repack -ad >/dev/null 2>&1 git prune >/dev/null 2>&1 git pull >/dev/null 2>&1 + [ "${1}" != "runup" ] && echo -e "${idsCL[Green]}Done${idsCL[Default]}" fi fi fi @@ -40,33 +41,31 @@ if curl -m 3 -s --head --request GET https://git.schroedercity.com | grep "HTTP else cd /opt/idssys/linupx fi - if [ "$1" != "update" ] && [ "$1" != "up" ]; then - 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 "\e[1A"; - echo -e "\e[0K\r ${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 - git reflog expire --expire=now --all >/dev/null 2>&1 - git repack -ad >/dev/null 2>&1 - git prune >/dev/null 2>&1 - git pull >/dev/null 2>&1 - - if [ "${1}" != "runup" ]; then - source /opt/idssys/linupx/defaults.inc - echo -en "\e[1A"; - echo -e "\e[0K\r ${idsCL[Green]}Updated to v${VERS}${idsCL[Default]}" - fi + 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 - fi - if [ "${1}" != "runup" ] && [ "${udtd}" == "false" ]; then + git fetch origin master >/dev/null 2>&1 + git reset --hard origin/master >/dev/null 2>&1 + git reflog expire --expire=now --all >/dev/null 2>&1 + git repack -ad >/dev/null 2>&1 + git prune >/dev/null 2>&1 + git pull >/dev/null 2>&1 + + if [ "${1}" != "runup" ]; then + source /opt/idssys/linupx/defaults.inc + # echo -en "\e[1A"; + # echo -e "\e[0K\r ${idsCL[Green]}Updated to v${VERS}${idsCL[Default]}" + 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 "" fi + else echo -e "${idsCL[Red]}Could not connect to 'git.schroedercity.com' for updates${idsCL[Default]}" fi