change git

This commit is contained in:
2019-01-05 23:22:32 -06:00
parent dc84b2da7f
commit 8ae1dea012
2 changed files with 12 additions and 11 deletions

View File

@@ -3,7 +3,7 @@
action="$1" action="$1"
FOLDER='/opt/mysqlbu' FOLDER='/opt/mysqlbu'
VERS='1.01052019' VERS='1.01062019'
source /opt/mysqlbu/settings.conf source /opt/mysqlbu/settings.conf
source /dev/stdin <<< "$(curl -sL https://git.schroedercity.com/voltron/Misc-Scripts/raw/master/colors.inc)" source /dev/stdin <<< "$(curl -sL https://git.schroedercity.com/voltron/Misc-Scripts/raw/master/colors.inc)"

5
run.sh
View File

@@ -4,8 +4,8 @@
source /opt/mysqlbu/settings.conf source /opt/mysqlbu/settings.conf
cd /opt/mysqlbu cd /opt/mysqlbu
#echo "" #echo ""
if [ $1 != "backup" ]; then
if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remote origin -h refs/heads/master |cut -f1`" ]; 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 fetch origin master >/dev/null 2>&1
git reset --hard 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 reflog expire --expire=now --all >/dev/null 2>&1
@@ -14,6 +14,7 @@ if [ "`git log --pretty=%H ...refs/heads/master^ | head -n 1`" != "`git ls-remot
git pull >/dev/null 2>&1 git pull >/dev/null 2>&1
#echo "" #echo ""
#echo -e "\e[92m\e[1mLinUPx update completed\e[0m" #echo -e "\e[92m\e[1mLinUPx update completed\e[0m"
fi
fi fi
./mysqlbu-scripts.sh $1 $2 ./mysqlbu-scripts.sh $1 $2
exit 0 exit 0