summaryrefslogtreecommitdiff
path: root/etckeeper
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-07-25 19:47:45 -0400
committerJoey Hess <joey@kitenet.net>2010-07-25 19:47:45 -0400
commit60747c8dae14a12263124193572c7eb1177e475b (patch)
treea422aa8bd97856cf0abfb250e8e2ce31fededf67 /etckeeper
parent3848d6b6c9ea4c6e9d3fa0164b9103f70d1b6789 (diff)
Ensure that PATH contains the directory containing etckeeper, so that hook scripts that re-exec etckeeper are guaranteed to find it.
Diffstat (limited to 'etckeeper')
-rwxr-xr-xetckeeper6
1 files changed, 6 insertions, 0 deletions
diff --git a/etckeeper b/etckeeper
index 4c27005..d7b94a0 100755
--- a/etckeeper
+++ b/etckeeper
@@ -25,6 +25,12 @@ export VCS
HOME=~root
export HOME
+program_directory="${0%/*}"
+if [ -n "$program_directory" ]; then
+ PATH="$PATH:$program_directory"
+ export PATH
+fi
+
if [ ! -z "$GIT_COMMIT_OPTIONS" ]; then
export GIT_COMMIT_OPTIONS
fi