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