mame/docs/update.sh

21 lines
338 B
Bash
Raw Normal View History

2016-08-24 15:15:09 +02:00
#!/bin/sh
git fetch
LOCAL=$(git rev-parse @)
REMOTE=$(git rev-parse @{u})
BASE=$(git merge-base @ @{u})
if [ $LOCAL = $REMOTE ]; then
echo "Up-to-date"
elif [ $LOCAL = $BASE ]; then
echo "Need to pull"
git pull
make clean
make site
elif [ $REMOTE = $BASE ]; then
echo "Need to push"
else
echo "Diverged"
fi