summaryrefslogtreecommitdiff
path: root/etckeeper
diff options
context:
space:
mode:
authorRĂ©mi Vanicat <vanicat@debian.org>2007-11-13 20:08:32 +0100
committerJoey Hess <joey@kodama.kitenet.net>2007-11-14 13:25:40 -0500
commit146c72298aea05c64df89d40f01c6136f70d3fda (patch)
tree0246e7dff8a0387db6e8fc6ebd26d07f24ac37f7 /etckeeper
parent9346843fa6da3b598fc970238ff2b3a374bd80cd (diff)
Render option to git commit configurable
When etckeeper commit something it use a default message that can be configured, but not easily edited on a case by case basis. To make this possible, and to give other way to customize commit, I add a configuration file that contain for now only one option: GIT_COMMIT_OPTION that can contain option given to git commit when run by etckeeper
Diffstat (limited to 'etckeeper')
-rwxr-xr-xetckeeper8
1 files changed, 8 insertions, 0 deletions
diff --git a/etckeeper b/etckeeper
index 363f706..a9cf577 100755
--- a/etckeeper
+++ b/etckeeper
@@ -1,6 +1,14 @@
#!/bin/sh
set -e
+if [ -e /etc/etckeeper/etckeeper.conf ]; then
+ . /etc/etckeeper/etckeeper.conf
+fi
+
+if [ ! -z "$GIT_COMMIT_OPTION" ]; then
+ export GIT_COMMIT_OPTION
+fi
+
if [ -z "$1" ]; then
echo "usage: etckeeper command [directory]" >&2
exit 1