aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-04 06:50:36 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-04-04 06:50:36 +0000
commitf382d25b3c704b2a9cec271d484af28ab722b01d (patch)
treea8041c0b821b9a6aa3ed2ca217a4a03ee3dd7e48
parentd3a7b80c4d0d9c405f35fde821849e5bb400892e (diff)
downloadpaludis-f382d25b3c704b2a9cec271d484af28ab722b01d.tar.gz
paludis-f382d25b3c704b2a9cec271d484af28ab722b01d.tar.xz
Avoid sourcing bashrc twice
-rwxr-xr-xebuild/ebuild.bash6
1 files changed, 4 insertions, 2 deletions
diff --git a/ebuild/ebuild.bash b/ebuild/ebuild.bash
index 7f1b3d0..fecb3c5 100755
--- a/ebuild/ebuild.bash
+++ b/ebuild/ebuild.bash
@@ -91,8 +91,10 @@ unset ${_saved_vars}
if [[ -r ${PALUDIS_CONFIG_DIR}/bashrc ]]; then
source ${PALUDIS_CONFIG_DIR}/bashrc
fi
-if [[ -r ${ROOT}/${PALUDIS_CONFIG_DIR}/bashrc ]]; then
- source ${ROOT}/${PALUDIS_CONFIG_DIR}/bashrc
+if [[ -n "${ROOT}" ]] && [[ "${ROOT}" != "/" ]] ; then
+ if [[ -r ${ROOT}/${PALUDIS_CONFIG_DIR}/bashrc ]]; then
+ source ${ROOT}/${PALUDIS_CONFIG_DIR}/bashrc
+ fi
fi
if [[ -r ${HOME}/.paludis/bashrc ]]; then
source ${HOME}/.paludis/bashrc