Update run.sh
This commit is contained in:
9
run.sh
9
run.sh
@@ -1,6 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# UbUpdate - Ubuntu Update Scripts Loader
|
# UbUpdate - Ubuntu Update Scripts Loader
|
||||||
|
|
||||||
|
source /opt/LinUPx/settings.conf
|
||||||
|
|
||||||
cd /opt/LinUPx
|
cd /opt/LinUPx
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
@@ -9,10 +11,15 @@ if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" = "`git ls-remote
|
|||||||
else
|
else
|
||||||
echo -e "\e[93m\e[1mnot up to date\e[21m, updating now...\e[0m"
|
echo -e "\e[93m\e[1mnot up to date\e[21m, updating now...\e[0m"
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
# git -c http.sslVerify=false pull
|
# git -c http.sslVerify=false pull
|
||||||
git fetch origin master
|
git fetch origin master
|
||||||
git reset --hard origin/master
|
git reset --hard origin/master
|
||||||
source /opt/LinUPx/settings.conf
|
|
||||||
|
git reflog expire --expire=now --all
|
||||||
|
git repack -ad # Remove dangling objects from packfiles
|
||||||
|
git prune # Remove dangling loose objects
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "\e[92m\e[1mLinUPx update completed\e[0m"
|
echo -e "\e[92m\e[1mLinUPx update completed\e[0m"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user