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
|
if [ "${1}" != "runup" ]; then
|
||||||
echo -en "${idsCL[LightCyan]}Checking for updates...${idsCL[Default]}"
|
echo -en "${idsCL[LightCyan]}Checking for updates...${idsCL[Default]}"
|
||||||
echo ""
|
echo ""
|
||||||
udtd=false
|
udtd=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${1}" != "runup" ]; then
|
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
|
if [ "${1}" != "runup" ]; then
|
||||||
echo -en "\e[1A";
|
echo -en "\e[1A";
|
||||||
echo -en "\e[0K\r${idsCL[LightCyan]}Updating iDSSYS-Defaults...${idsCL[Default]}"
|
echo -en "\e[0K\r${idsCL[LightCyan]}Updating iDSSYS-Defaults...${idsCL[Default]}"
|
||||||
udtd=true
|
udtd=1
|
||||||
fi
|
fi
|
||||||
git fetch origin master >/dev/null 2>&1
|
git fetch origin master >/dev/null 2>&1
|
||||||
git reset --hard 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
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -d /opt/idssys/LinUPx ]; then
|
|
||||||
cd /opt/idssys/LinUPx
|
cd /opt/idssys/linupx
|
||||||
else
|
|
||||||
cd /opt/idssys/linupx
|
|
||||||
fi
|
|
||||||
if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; 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
|
if [ "${1}" != "runup" ]; then
|
||||||
echo -en "${idsCL[LightCyan]}Updating LinUPx...${idsCL[Default]}"
|
echo -en "${idsCL[LightCyan]}Updating LinUPx...${idsCL[Default]}"
|
||||||
udtd=true
|
|
||||||
fi
|
fi
|
||||||
git fetch origin master >/dev/null 2>&1
|
git fetch origin master >/dev/null 2>&1
|
||||||
git reset --hard 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]}"
|
echo -e " ${idsCL[Green]}Updated to v${VERS}${idsCL[Default]}"
|
||||||
fi
|
fi
|
||||||
elif [ "${1}" != "runup" ]; then
|
elif [ "${1}" != "runup" ]; then
|
||||||
# echo -en "\e[1A";
|
if [ ${udtd} -eq 1 ]; then
|
||||||
# echo -e "\e[0K\r ${idsCL[Green]}No updates available${idsCL[Default]}"
|
echo -en "\e[1A";
|
||||||
echo -e "${idsCL[Green]}No updates available${idsCL[Default]}"
|
echo -e "\e[0K\r ${idsCL[Green]}No updates available${idsCL[Default]}"
|
||||||
|
else
|
||||||
|
echo -e "${idsCL[Green]}No updates available${idsCL[Default]}"
|
||||||
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user