Update run.sh

This commit is contained in:
2019-11-24 19:42:39 -06:00
parent e835e12619
commit 6db420a07a

20
run.sh
View File

@@ -13,16 +13,16 @@ if [ "${1}" != "runup" ]; then
echo "" echo ""
fi fi
cd /opt/idssys/defaults if [ "${1}" != "runup" ]; then
if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then cd /opt/idssys/defaults
git fetch origin master >/dev/null 2>&1 if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then
git reset --hard origin/master >/dev/null 2>&1 git fetch origin master >/dev/null 2>&1
git reflog expire --expire=now --all >/dev/null 2>&1 git reset --hard origin/master >/dev/null 2>&1
git repack -ad >/dev/null 2>&1 git reflog expire --expire=now --all >/dev/null 2>&1
git prune >/dev/null 2>&1 git repack -ad >/dev/null 2>&1
git pull >/dev/null 2>&1 git prune >/dev/null 2>&1
#echo "" git pull >/dev/null 2>&1
#echo -e "\e[92m\e[1mLinUPx update completed\e[0m" fi
fi fi
if [ -d /opt/idssys/LinUPx ]; then if [ -d /opt/idssys/LinUPx ]; then
cd /opt/idssys/LinUPx cd /opt/idssys/LinUPx