Updated Update logic
This commit is contained in:
parent
8ccd8ef874
commit
b63718ae75
|
@ -5,14 +5,24 @@ cd /CoffeeHousePy
|
||||||
echo "### Checking for updates ###"
|
echo "### Checking for updates ###"
|
||||||
git remote update
|
git remote update
|
||||||
|
|
||||||
UPSTREAM=${1:-'@{u}'}
|
#UPSTREAM=${1:-'@{u}'}
|
||||||
LOCAL=$(git rev-parse @)
|
#LOCAL=$(git rev-parse @)
|
||||||
BASE=$(git merge-base @ "$UPSTREAM")
|
#BASE=$(git merge-base @ "$UPSTREAM")
|
||||||
|
|
||||||
if [ $LOCAL = $BASE ]; then
|
#if [ $LOCAL = $BASE ]; then
|
||||||
|
# echo "### Applying update ###"
|
||||||
|
# git pull
|
||||||
|
# make clean install
|
||||||
|
#fi
|
||||||
|
|
||||||
|
changed=0
|
||||||
|
git remote update && git status -uno | grep -q 'Your branch is behind' && changed=1
|
||||||
|
if [ $changed = 1 ]; then
|
||||||
echo "### Applying update ###"
|
echo "### Applying update ###"
|
||||||
git pull
|
git pull
|
||||||
make clean install
|
make clean install
|
||||||
|
else
|
||||||
|
echo "### CoffeeHouse-Utils is up-to-date ###"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "### Starting CoffeeHouse-LangDetect ###"
|
echo "### Starting CoffeeHouse-LangDetect ###"
|
||||||
|
|
Loading…
Reference in New Issue