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"
FOLDER='/opt/LinUPx'
VERS='4.11232018'
VERS='4.01052019'
if [ ! -f /opt/LinUPx/settings.conf ]; then
echo -ne "useAutoremove=1

30
run.sh
View File

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