summaryrefslogtreecommitdiff
path: root/init.d/70vcs-add
diff options
context:
space:
mode:
Diffstat (limited to 'init.d/70vcs-add')
-rwxr-xr-xinit.d/70vcs-add12
1 files changed, 12 insertions, 0 deletions
diff --git a/init.d/70vcs-add b/init.d/70vcs-add
new file mode 100755
index 0000000..8cf60d0
--- /dev/null
+++ b/init.d/70vcs-add
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -e
+
+if [ "$VCS" = git ]; then
+ if ! git add .; then
+ echo "etckeeper warning: git add failed" >&2
+ fi
+elif [ "$VCS" = hg ]; then
+ if ! hg add .; then
+ echo "etckeeper warning: hg add failed" >&2
+ fi
+fi