git-pull-and-run-if-origin-changed: pull every 10s and show commit-ids

This commit is contained in:
Michael Hoennig 2024-09-13 13:57:39 +02:00
parent b76bd5664d
commit 3c4139c726

View File

@ -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