aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Bo ├śrsted Andresen <bo.andresen@zlin.dk> 2010-03-10 18:33:19 +0000
committerAvatar Bo ├śrsted Andresen <bo.andresen@zlin.dk> 2010-03-10 19:04:11 +0000
commitdf1af9084bbd406526548f4cab015fc32c448f05 (patch)
tree9d46ae99af7002de4e84c1c30c61054a9a5b3821
parent06aa0bc20f87b3134d09b05babcb13ba045acbed (diff)
downloadpaludis-df1af9084bbd406526548f4cab015fc32c448f05.tar.gz
paludis-df1af9084bbd406526548f4cab015fc32c448f05.tar.xz
Use a subshell to avoid a v variable in the resulting environment.
-rwxr-xr-xpaludis/repositories/e/ebuild/ebuild.bash14
1 files changed, 8 insertions, 6 deletions
diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
index e435dd6..e4bdbfb 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -298,12 +298,14 @@ ebuild_scrub_environment()
done )
export -n SANDBOX_ACTIVE
- for v in ${!BASH_*}; do
- case "${v#BASH_}" in
- ARGC|ARGV|LINENO|SOURCE|VERSINFO|REMATCH) ;;
- *) unset -v ${v} ;;
- esac
- done
+ unset -v $(
+ for v in ${!BASH_*}; do
+ case "${v#BASH_}" in
+ (ARGC|ARGV|LINENO|SOURCE|VERSINFO|REMATCH) : ;;
+ (*) echo ${v} ;;
+ esac
+ done
+ )
set >"${1}"
print_exports >>"${1}"