aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-06 14:52:19 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-06 14:52:27 +1300
commitae895daf7ec5240300bd87a7157419ce586d9a72 (patch)
tree4d3646e02f02626e4995dc71641e71f17bdf16bc
parentRefactor tag generation functions (diff)
downloadwatch-vcs-tags-ae895daf7ec5240300bd87a7157419ce586d9a72.tar.gz
watch-vcs-tags-ae895daf7ec5240300bd87a7157419ce586d9a72.zip
Correct/adjust default behaviour with no args
-rw-r--r--watch-git-tags.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/watch-git-tags.sh b/watch-git-tags.sh
index 857fbd0..ba63f1c 100644
--- a/watch-git-tags.sh
+++ b/watch-git-tags.sh
@@ -24,7 +24,9 @@ for sig in EXIT HUP INT TERM ; do
done
# Use current directory if no other arguments
-[ "$#" -gt 0 ] || set -- .
+if [ "$#" -eq 0 ] ; then
+ set -- "$PWD"
+fi
# Iterate through each repo in a subshell in parallel
for repo ; do (