diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2007-11-06 00:09:05 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2007-11-06 00:09:05 -0500 |
commit | a9c4fe62edabb7dbb4970edbe15ba6ed146eba1a (patch) | |
tree | 1cdf579f7b5ec3d2f93de7895129217fdb25010d /etckeeper | |
parent | ad7202a18498d46420aefba9b0746ea187dd0472 (diff) |
rationallised directory handling
Default to cding to /etc, but allow the user to specify another directory
to operate on.
Diffstat (limited to 'etckeeper')
-rwxr-xr-x | etckeeper | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -13,10 +13,10 @@ if [ ! -d "/etc/etckeeper/$command.d" ]; then exit 1 fi -if [ "$command" = post-apt ] || [ "$command" = pre-apt ]; then - cd /etc -elif [ "$command" = pre-commit ] && [ -n "$1" ]; then +if [ -n "$1" ]; then cd "$1" +else + cd /etc fi run-parts "/etc/etckeeper/$command.d" |