This commit is contained in:
2023-08-28 19:50:38 -05:00
parent 48a1d8c247
commit 863c12d97d
2 changed files with 19 additions and 4 deletions

18
run.sh
View File

@@ -14,7 +14,11 @@ if curl -m 5 -s --head --request GET https://git.schroedercity.com | grep "HTTP
if [ "${1}" != "runup" ]; then
cd /opt/idssys/defaults
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
echo -en "\e[1A";
echo -e "${idsCL[LightCyan]}Updating iDSSYS-Defaults...${idsCL[Default]}"
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
@@ -29,13 +33,23 @@ if curl -m 5 -s --head --request GET https://git.schroedercity.com | grep "HTTP
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 [ "`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]}"
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
echo -en "\e[1A";
echo -e "\e[0K\r ${idsCL[Green]}Updated to v${VERS}${idsCL[Default]}"
fi
fi
fi
if [ "${1}" != "runup" ]; then