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