diff options
author | Mathieu Clabaut <mathieu.clabaut@gmail.com> | 2007-12-21 15:47:30 -0600 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-01-03 19:53:46 -0500 |
commit | f82235032f162aae0bb08828d45c6306e60dcd29 (patch) | |
tree | a4479471b8b8c91903e1ceaf54dfea42e3457a4a /etckeeper | |
parent | 631af60701ca747861d67a19d431005c7d45d6be (diff) |
hg and git subrepo creation (hg is for now a copy of git)
Diffstat (limited to 'etckeeper')
-rwxr-xr-x | etckeeper | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -5,6 +5,11 @@ if [ -e /etc/etckeeper/etckeeper.conf ]; then . /etc/etckeeper/etckeeper.conf fi +if [ -z "$VCS" ]; then + echo "Please configure a VCS in /etc/etckeeper/etckeeper.conf" >&2 + exit 1 +fi + if [ ! -z "$GIT_COMMIT_OPTIONS" ]; then export GIT_COMMIT_OPTIONS fi @@ -19,8 +24,8 @@ fi command="$1" shift 1 -if [ ! -d "/etc/etckeeper/$command.d" ]; then - echo "etckeeper: /etc/etckeeper/$command.d does not exist" >&2 +if [ ! -d "/etc/etckeeper/$VCS/$command.d" ]; then + echo "etckeeper: /etc/etckeeper/$VCS/$command.d does not exist" >&2 exit 1 fi @@ -30,4 +35,4 @@ else cd /etc fi -run-parts --exit-on-error "/etc/etckeeper/$command.d" +run-parts --exit-on-error "/etc/etckeeper/$VCS/$command.d" |