From a6ab71be5d5dc5d2cf8c5c24d0b4d4fc850080a0 Mon Sep 17 00:00:00 2001 From: Rouben Date: Thu, 8 May 2014 03:57:17 -0400 Subject: Added support for pushing to multiple remote repositories --- commit.d/99push | 8 ++++++-- etckeeper.conf | 3 ++- 2 files changed, 8 insertions(+), 3 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 diff --git a/etckeeper.conf b/etckeeper.conf index 639c77b..f988c10 100644 --- a/etckeeper.conf +++ b/etckeeper.conf @@ -38,5 +38,6 @@ HIGHLEVEL_PACKAGE_MANAGER=apt LOWLEVEL_PACKAGE_MANAGER=dpkg # To push each commit to a remote, put the name of the remote here. -# (eg, "origin" for git). +# (eg, "origin" for git). Space-separated lists of multiple remotes +# also work (eg, "origin gitlab github" for git). PUSH_REMOTE="" -- cgit v1.2.3