summaryrefslogtreecommitdiff
path: root/commit.d
diff options
context:
space:
mode:
authorRouben <rouben@rouben.net>2014-05-08 03:57:17 -0400
committerRouben <rouben@rouben.net>2014-05-08 03:57:17 -0400
commita6ab71be5d5dc5d2cf8c5c24d0b4d4fc850080a0 (patch)
tree4fcce284870cc91a6c3418a384afc9d09c710145 /commit.d
parent214332b020b03e603d84ab3327f1c17509b49c47 (diff)
Added support for pushing to multiple remote repositories
Diffstat (limited to 'commit.d')
-rwxr-xr-xcommit.d/99push8
1 files changed, 6 insertions, 2 deletions
diff --git a/commit.d/99push b/commit.d/99push
index 5aa8d21..b5418f7 100755
--- a/commit.d/99push
+++ b/commit.d/99push
@@ -1,9 +1,13 @@
#!/bin/sh
if [ -n "$PUSH_REMOTE" ]; then
if [ "$VCS" = git ] && [ -d .git ]; then
- git push "$PUSH_REMOTE" master || true
+ for REMOTE in $PUSH_REMOTE; do
+ git push "$REMOTE" master || true
+ done
elif [ "$VCS" = hg ] && [ -d .hg ]; then
- hg push "$PUSH_REMOTE" || true
+ for REMOTE in $PUSH_REMOTE; do
+ hg push "$REMOTE" || true
+ done
else
echo "PUSH_REMOTE not yet supported for $VCS" >&2
fi