update
This commit is contained in:
@@ -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
30
run.sh
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user