fix alias usage in git-pull-and-run-if-origin-changed

This commit is contained in:
Michael Hoennig 2024-09-13 13:06:25 +02:00
parent 9f4ec47281
commit 0a1f568f3e

View File

@ -5,6 +5,8 @@ if [ -z "$1" ]; then
exit 1
fi
source .aliases
# get the current branch name
BRANCH=$(git rev-parse --abbrev-ref HEAD)
@ -16,7 +18,7 @@ while true; do
REMOTE=$(git rev-parse origin/$BRANCH)
# check if the local branch differs from the remote branch
if [ "$LOCAL" != "$REMOTE" ]; then
if [ "$LOCAL" == "$REMOTE" ]; then
echo "pulling changes from origin"
git pull origin $BRANCH