Update run.sh

This commit is contained in:
2018-10-13 16:41:49 -05:00
parent f34b9cca54
commit 50438c191a

11
run.sh
View File

@@ -3,11 +3,9 @@
cd /opt/LinUPx cd /opt/LinUPx
echo "" echo ""
#if [ -z "$1" ]; 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
echo -e "\e[92m\e[1mUp to date\e[0m" echo -e "\e[92m\e[1mUp to date\e[0m"
sleep 1
./linupx-scripts.sh $1
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
@@ -15,10 +13,9 @@ echo ""
git pull git pull
echo "" echo ""
echo -e "\e[92m\e[1mupdate completed\e[0m" echo -e "\e[92m\e[1mupdate completed\e[0m"
fi
sleep 1 sleep 1
./linupx-scripts.sh $1 ./linupx-scripts.sh $1
fi
#else
# ./linupx-scripts.sh $1
#fi
exit 0 exit 0