Update run.sh
This commit is contained in:
21
run.sh
21
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user