summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-12-27 17:07:35 +0100
committerJoey Hess <joey@kitenet.net>2012-12-28 12:04:29 -0400
commite5742f7ae353f9a675e13fc0b951daeeff82bdae (patch)
tree8c4ca9333a2bc54b49bd2704d8e18d131c0aecc1
parent96d7d866cbd9b3b534e1e9562793f452bb5f922f (diff)
Auto-detect the VCS setting if there already is a repository in /etc.
-rw-r--r--debian/changelog5
-rwxr-xr-xetckeeper10
2 files changed, 15 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 9ea9a3e..6347a70 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,14 @@
etckeeper (0.65) UNRELEASED; urgency=low
+ [ Joey Hess ]
* Unset GIT_DIR and GIT_WORK_TREE. Closes: #689101
* PUSH_REMOTE can be set to automatically push to a remote on commit.
Thanks, L. Alberto Giménez
+ [ Jelmer Vernooij ]
+ * Auto-detect the VCS setting if there already is a repository in
+ /etc.
+
-- Joey Hess <joeyh@debian.org> Sat, 29 Sep 2012 10:46:21 -0400
etckeeper (0.64) unstable; urgency=low
diff --git a/etckeeper b/etckeeper
index fad1f20..bbdecff 100755
--- a/etckeeper
+++ b/etckeeper
@@ -16,6 +16,16 @@ if [ -e $conf ]; then
. $conf
fi
+if [ -d ".git" ]; then
+ VCS=git
+elif [ -d ".hg" ]; then
+ VCS=hg
+elif [ -d "_darcs" ]; then
+ VCS=darcs
+elif [ -d ".bzr" ]; then
+ VCS=bzr
+fi
+
if [ -z "$VCS" ]; then
echo "Please configure a VCS in $conf" >&2
exit 1