aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-03-31 16:14:46 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-03-31 16:14:46 +0000
commit70914505e8a8423dc8ada7dcad20e2ca71f263c5 (patch)
tree4445e2bac6a4eb72dd6aa44390218659c6804f3b
parent2645ee55c37e6278e2b03fe5fad75d49b94d4206 (diff)
downloadpaludis-70914505e8a8423dc8ada7dcad20e2ca71f263c5.tar.gz
paludis-70914505e8a8423dc8ada7dcad20e2ca71f263c5.tar.xz
Remove the need to export things in user bashrc files
-rwxr-xr-xpaludis/repositories/gentoo/ebuild/ebuild.bash11
1 files changed, 9 insertions, 2 deletions
diff --git a/paludis/repositories/gentoo/ebuild/ebuild.bash b/paludis/repositories/gentoo/ebuild/ebuild.bash
index ac9737d..05cb910 100755
--- a/paludis/repositories/gentoo/ebuild/ebuild.bash
+++ b/paludis/repositories/gentoo/ebuild/ebuild.bash
@@ -87,14 +87,18 @@ ebuild_source_profile()
done <${1}/parent
fi
+ local old_set=$-
+ set -a
+
if [[ -f ${1}/make.defaults ]] ; then
- eval "$(sed -e 's/^\([a-zA-Z0-9\-_]\+=\)/export \1/' ${1}/make.defaults )" \
- || die "Couldn't source ${1}/make.defaults"
+ source ${1}/make.defaults || die "Couldn't source ${1}/make.defaults"
fi
if [[ -f ${1}/bashrc ]] ; then
source ${1}/bashrc || die "Couldn't source ${1}/bashrc"
fi
+
+ [[ "${old_set}" == *a* ]] || set +a
}
export CONFIG_PROTECT="${PALUDIS_CONFIG_PROTECT}"
@@ -120,7 +124,10 @@ unset ${save_vars} ${save_base_vars}
for f in ${PALUDIS_BASHRC_FILES} ; do
if [[ -f ${f} ]] ; then
ebuild_notice "debug" "Loading bashrc file ${f}"
+ old_set=$-
+ set -a
source ${f}
+ [[ "${old_set}" == *a* ]] || set +a
else
ebuild_notice "debug" "Skipping bashrc file ${f}"
fi