summaryrefslogtreecommitdiff
path: root/etckeeper
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 /etckeeper
parent96d7d866cbd9b3b534e1e9562793f452bb5f922f (diff)
Auto-detect the VCS setting if there already is a repository in /etc.
Diffstat (limited to 'etckeeper')
-rwxr-xr-xetckeeper10
1 files changed, 10 insertions, 0 deletions
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