Update run.sh

This commit is contained in:
2023-12-22 20:43:34 -06:00
parent 7926052fda
commit 20c53a4b6b

28
run.sh
View File

@@ -16,19 +16,23 @@ if curl -m 3 -s --head --request GET https://git.schroedercity.com | grep "HTTP
fi
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 [ "${1}" != "runup" ]; then
echo -en "\e[1A";
echo -e "${idsCL[LightCyan]}Updating iDSSYS-Defaults...${idsCL[Default]}"
udtd=true
if [ ! -d /opt/idssys/defaults ]; then
git clone https://git.schroedercity.com/voltron/iDS-Defaults.git /opt/idssys/defaults
else
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 [ "${1}" != "runup" ]; then
echo -en "\e[1A";
echo -e "${idsCL[LightCyan]}Updating iDSSYS-Defaults...${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
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
fi
fi
if [ -d /opt/idssys/LinUPx ]; then