This commit is contained in:
2019-01-05 23:42:11 -06:00
parent d94622b415
commit fd7b0ed029
2 changed files with 13 additions and 19 deletions

View File

@@ -3,7 +3,7 @@
action="$1" action="$1"
FOLDER='/opt/LinUPx' FOLDER='/opt/LinUPx'
VERS='4.11232018' VERS='4.01052019'
if [ ! -f /opt/LinUPx/settings.conf ]; then if [ ! -f /opt/LinUPx/settings.conf ]; then
echo -ne "useAutoremove=1 echo -ne "useAutoremove=1

30
run.sh
View File

@@ -4,25 +4,19 @@
source /opt/LinUPx/settings.conf source /opt/LinUPx/settings.conf
cd /opt/LinUPx cd /opt/LinUPx
echo "" #echo ""
if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" = "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then if [ $1 != "update" ]; then
echo -e "\e[92m\e[1mUp to date\e[0m" if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; then
else git fetch origin master >/dev/null 2>&1
echo -e "\e[93m\e[1mnot up to date\e[21m, updating now...\e[0m" git reset --hard origin/master >/dev/null 2>&1
sleep 1 git reflog expire --expire=now --all >/dev/null 2>&1
git repack -ad >/dev/null 2>&1
# git -c http.sslVerify=false pull git prune >/dev/null 2>&1
git fetch origin master git pull >/dev/null 2>&1
git reset --hard origin/master #echo ""
#echo -e "\e[92m\e[1mLinUPx update completed\e[0m"
git reflog expire --expire=now --all fi
git repack -ad # Remove dangling objects from packfiles
git prune # Remove dangling loose objects
git pull
echo ""
echo -e "\e[92m\e[1mLinUPx update completed\e[0m"
fi fi
sleep 1 sleep 1