summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog1
-rwxr-xr-xetckeeper10
2 files changed, 8 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 15feb06..7a6ce44 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ etckeeper (0.30) UNRELEASED; urgency=low
file, only touching the part inside a "managed by etckeeper"
comment block.
* Run etckeeper update-ignore on upgrade.
+ * Fix handling of -d in recursive calls to etckeeper
-- Joey Hess <joeyh@debian.org> Fri, 13 Feb 2009 22:09:28 -0500
diff --git a/etckeeper b/etckeeper
index 66b9e08..7a6933c 100755
--- a/etckeeper
+++ b/etckeeper
@@ -60,15 +60,19 @@ fi
if [ "x$1" = "x-d" ]; then
if [ -n "$2" ]; then
- cd "$2"
+ ETCKEEPER_DIR="$2"
shift 2
else
usage
fi
-else
- cd /etc
fi
+if [ -z "$ETCKEEPER_DIR" ]; then
+ ETCKEEPER_DIR=/etc
+fi
+cd "$ETCKEEPER_DIR"
+export ETCKEEPER_DIR
+
lsscripts() {
perl -e '
$dir=shift;