summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-11-27 15:57:11 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de>2017-11-27 15:58:17 +0000
commit64cbaf56f14518ebd10bda62964706dac289ebdc (patch)
treeb1ba7869f9bd7743bc473618f512242bfbb683d3
parent5725cd3a49176066a051636c2ec423799dcb856f (diff)
downloadmidipix_build-64cbaf56f14518ebd10bda62964706dac289ebdc.tar.bz2
midipix_build-64cbaf56f14518ebd10bda62964706dac289ebdc.tar.xz
subr/ex_{pkg_env.rtl}.subr: fix ${PKG_ENV_VARS_EXTRA} processing.
-rw-r--r--subr/ex_pkg_env.subr5
-rw-r--r--subr/ex_rtl.subr6
2 files changed, 7 insertions, 4 deletions
diff --git a/subr/ex_pkg_env.subr b/subr/ex_pkg_env.subr
index 5eff40ed..d3921e5f 100644
--- a/subr/ex_pkg_env.subr
+++ b/subr/ex_pkg_env.subr
@@ -50,9 +50,10 @@ ex_pkg_env() {
esac; ;;
esac; ;;
esac;
- for _vname in $(ex_split : ${PKG_ENV_VARS_EXTRA}); do
+ ex_push_IFS :;
+ for _vname in ${PKG_ENV_VARS_EXTRA}; do
export "${_vname}";
- done;
+ done; ex_pop_IFS;
if [ -n "${PKG_ENV_VARS}" ]\
&& [ "${PKG_NO_LOG_VARS:-0}" -eq 0 ]; then
PKG_ENV_VARS="$(echo "${PKG_ENV_VARS}" | tr " " "\n" | sort | tr "\n" " ")";
diff --git a/subr/ex_rtl.subr b/subr/ex_rtl.subr
index b014a384..150b0f4d 100644
--- a/subr/ex_rtl.subr
+++ b/subr/ex_rtl.subr
@@ -2,7 +2,7 @@
# set -o errexit -o noglob are assumed.
#
-IFS_NL="
+EXP_IFS_NL="
";
ex_basename() { echo "${1##*/}"; };
@@ -10,7 +10,9 @@ ex_date() { command date "+${1:-${TIMESTAMP_FMT}}"; };
ex_dirname() { echo "${1%/*}"; };
ex_get_var_unsafe() { eval echo \${${1}}; };
ex_set_var_unsafe() { [ -n "${2}" ] && eval ${1}=\"${2}\" || return 0; };
-ex_split() { local IFS="${1}"; set -- $(echo "${2}"); IFS="${IFS_NL}"; echo "${*}"; };
+ex_pop_IFS() { IFS="${EXP_OLDIFS}"; };
+ex_push_IFS() { EXP_OLDIFS="${IFS}"; IFS="${1}"; };
+ex_push_IFS_nl() { ex_push_IFS "${EXP_IFS_NL}"; };
ex_test_cmd() { command -v "${1}" >/dev/null; };
ex_toupper() { echo "${1}" | tr a-z A-Z; };