Update run.sh

This commit is contained in:
2019-01-05 12:12:17 -06:00
parent 68c5c1dda2
commit a6c29baa88

5
run.sh
View File

@@ -5,10 +5,7 @@ source /opt/mysqlbu/settings.conf
cd /opt/mysqlbu
#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"
if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1 >/dev/null`" != "`git ls-remote origin -h refs/heads/master |cut -f1 >/dev/null`" ]; then
git fetch origin master >/dev/null
git reset --hard origin/master >/dev/null
git reflog expire --expire=now --all >/dev/null