summaryrefslogtreecommitdiff
path: root/functions/chroot.sh
diff options
context:
space:
mode:
Diffstat (limited to 'functions/chroot.sh')
-rwxr-xr-xfunctions/chroot.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/functions/chroot.sh b/functions/chroot.sh
index 4d1d9890c..954b5977d 100755
--- a/functions/chroot.sh
+++ b/functions/chroot.sh
@@ -16,12 +16,15 @@ Chroot ()
# Executing commands in chroot
Echo_debug "Executing: %s" "${COMMANDS}"
- if [ -e config/environment.chroot ]
- then
- ENV="$(grep -v '^#' config/environment.chroot)"
- else
- ENV=""
- fi
+ ENV=""
+
+ for _FILE in config/environment config/environment.chroot
+ do
+ if [ -e "${_FILE}" ]
+ then
+ ENV="${ENV} $(grep -v '^#' ${_FILE})"
+ fi
+ done
if [ "${LB_USE_FAKEROOT}" != "true" ]
then