git-pull-and-run-if-origin-changed: pull every 10s and show commit-ids
This commit is contained in:
parent
b76bd5664d
commit
3c4139c726
@ -12,7 +12,7 @@ while true; do
|
||||
|
||||
# check if the local branch differs from the remote branch
|
||||
if [ "$LOCAL" != "$REMOTE" ]; then
|
||||
echo "pulling changes from origin"
|
||||
echo "local $LOCAL differs from remote $REMOTE => pulling changes from origin"
|
||||
git pull origin $BRANCH
|
||||
|
||||
# run the command
|
||||
@ -23,6 +23,7 @@ while true; do
|
||||
echo "no changes detected on the origin branch"
|
||||
fi
|
||||
|
||||
echo "waiting for 1 minute before checking again..."
|
||||
sleep 60
|
||||
echo -e "waiting for changes..."
|
||||
sleep 10
|
||||
echo -e "\r\033[K"
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user