From 5f6c02e23aa11e8840bbe5c59c9e3ff670e81397 Mon Sep 17 00:00:00 2001 From: "L. Alberto Giménez" Date: Sun, 18 Nov 2012 23:51:20 +0100 Subject: Add support for auto-pushing after a commit A new variable is introduced that will cause etckeeper to push to a configuration-defined remote. --- commit.d/99git-push | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 commit.d/99git-push (limited to 'commit.d') diff --git a/commit.d/99git-push b/commit.d/99git-push new file mode 100755 index 0000000..0c3cdd1 --- /dev/null +++ b/commit.d/99git-push @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +if [ "$VCS" = git ] && [ -d .git ] && [ -n "$PUSH_REMOTE" ]; then + if git config --get remote.$PUSH_REMOTE.url; then + git push $PUSH_REMOTE master + else + echo "etckeeper warning: Configured remote '$PUSH_REMOTE' is unknown to git" + fi +fi -- cgit v1.2.3