Update run.sh

This commit is contained in:
2019-01-05 12:06:17 -06:00
parent e824ca272d
commit aa9e0d98b9

10
run.sh
View File

@@ -4,20 +4,20 @@
source /opt/mysqlbu/settings.conf
cd /opt/mysqlbu
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"
#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"
#echo -e "\e[93m\e[1mnot up to date\e[21m, updating now...\e[0m"
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"
#echo ""
#echo -e "\e[92m\e[1mLinUPx update completed\e[0m"
fi
./mysqlbu-scripts.sh $1 $2