fix alias usage in git-pull-and-run-if-origin-changed
This commit is contained in:
parent
8178ad80df
commit
814fef4185
@ -1,13 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
echo "command missing in arguments" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
shopt -s expand_aliases
|
|
||||||
source .aliases
|
|
||||||
|
|
||||||
# get the current branch name
|
# get the current branch name
|
||||||
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||||
|
|
||||||
@ -24,8 +16,10 @@ while true; do
|
|||||||
git pull origin $BRANCH
|
git pull origin $BRANCH
|
||||||
|
|
||||||
# run the command
|
# run the command
|
||||||
echo "Running $*"
|
echo "Running gw-test"
|
||||||
"$@"
|
shopt -s expand_aliases
|
||||||
|
source .aliases
|
||||||
|
gw-test
|
||||||
else
|
else
|
||||||
echo "no changes detected on the origin branch"
|
echo "no changes detected on the origin branch"
|
||||||
fi
|
fi
|
Loading…
Reference in New Issue
Block a user