aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'modules/env.eselect')
-rw-r--r--modules/env.eselect13
1 files changed, 5 insertions, 8 deletions
diff --git a/modules/env.eselect b/modules/env.eselect
index bdc396d..6c77005 100644
--- a/modules/env.eselect
+++ b/modules/env.eselect
@@ -82,7 +82,7 @@ update_envvar_classes() {
# Create profile.env file
create_profile_env() {
local -a envfiles
- local vars store items tmpprofile ifs_save
+ local vars store items tmpprofile ifs_save=${IFS}
envfiles=( "${EROOT}"/etc/env.d/* )
# Blank the file first!
@@ -116,8 +116,7 @@ create_profile_env() {
store=$(load_config "${envfile}" ${var})
else
items=$(load_config "${envfile}" ${var})
- ifs_save=${IFS-$' \t\n'}
- IFS=":"
+ local IFS=:
for item in ${items}; do
has ${item} ${store} \
|| store="${store}${store:+:}${item}"
@@ -146,8 +145,7 @@ create_profile_env() {
has LDPATH ${vars} || continue
# Store LDPATH for later processing
items=$(load_config "${envfile}" LDPATH)
- ifs_save=${IFS-$' \t\n'}
- IFS=":"
+ local IFS=:
items=( ${items} )
IFS=${ifs_save}
for item in "${items[@]}"; do
@@ -183,7 +181,7 @@ create_ld_so_conf() {
create_prelink_conf() {
[[ -z ${ESELECT_LDPATH[@]} ]] \
&& die -q "No LDPATHs found in ${EROOT}/etc/env.d/*"
- local path prelink_path prelink_mask str x ifs_save
+ local path prelink_path prelink_mask str x
str="# prelink.conf autogenerated by eselect\n"
str="${str}# Make all changes to /etc/env.d files\n"
# Add default items
@@ -197,8 +195,7 @@ create_prelink_conf() {
path=$(load_config "${ENVPROFILE}" PATH)
prelink_path=$(load_config "${ENVPROFILE}" PRELINK_PATH)
prelink_mask=$(load_config "${ENVPROFILE}" PRELINK_PATH_MASK)
- ifs_save=${IFS-$' \t\n'}
- IFS=":"
+ local ifs_save=${IFS} IFS=:
for x in ${path} ${prelink_path} "${ESELECT_LDPATH[@]}"; do
has ${x} ${prelink_mask} && continue
[[ -z ${x##*/} ]] || x="${x}/"