diff options
author | Loïc Minier <lool@dooz.org> | 2009-12-27 10:51:59 +0100 |
---|---|---|
committer | Loïc Minier <lool@dooz.org> | 2009-12-27 10:51:59 +0100 |
commit | 6c73bf0958124db588b14975fbef1d3ef2dae6c6 (patch) | |
tree | 0f698ec7ad4b3396d2b9429b04302564f4a4a930 /pbuilder-loadconfig | |
parent | db5c58bc4654fe13f3a7da77d6b5fdeed70a613a (diff) | |
download | pbuilder-6c73bf0958124db588b14975fbef1d3ef2dae6c6.tar pbuilder-6c73bf0958124db588b14975fbef1d3ef2dae6c6.tar.gz |
Honor PBUILDER_ROOT and PBUILDER_*DIR vars
Use GNU-style vars for system directories, allow to set them from the
env, and let them be prefixed with a PBUILDER_ROOT directory to allow
relocation.
Diffstat (limited to 'pbuilder-loadconfig')
-rw-r--r-- | pbuilder-loadconfig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pbuilder-loadconfig b/pbuilder-loadconfig index 2c00871..bd42461 100644 --- a/pbuilder-loadconfig +++ b/pbuilder-loadconfig @@ -17,7 +17,10 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -for RCFILE in /usr/share/pbuilder/pbuilderrc /etc/pbuilderrc ${HOME}/.pbuilderrc; do +export PBUILDER_PKGDATADIR="${PBUILDER_PKGDATADIR:-$PBUILDER_ROOT/usr/share/pbuilder}" +export PBUILDER_SYSCONFDIR="${PBUILDER_SYSCONFDIR:-$PBUILDER_ROOT/etc}" + +for RCFILE in "$PBUILDER_PKGDATADIR"/pbuilderrc "$PBUILDER_SYSCONFDIR"/pbuilderrc "$HOME"/.pbuilderrc; do if [ -f "$RCFILE" ]; then . "$RCFILE" else |