diff options
-rw-r--r-- | subr/pkg_install.subr | 6 | ||||
-rw-r--r-- | subr/rtl.subr | 2 | ||||
-rw-r--r-- | subr/rtl_complex.subr | 5 |
3 files changed, 8 insertions, 5 deletions
diff --git a/subr/pkg_install.subr b/subr/pkg_install.subr index f869ec5b..ee6c783c 100644 --- a/subr/pkg_install.subr +++ b/subr/pkg_install.subr @@ -3,9 +3,9 @@ # pkgp_install_perms() { - local _destdir="${1}" _fname="" _ifs_old="${IFS:- }" IFS; - IFS=" -"; for _fname in $(find "${_destdir}" -type d); do + local _destdir="${1}" _fname="" IFS; + rtl_set_IFS_nl; + for _fname in $(find "${_destdir}" -type d); do if ! rtl_fileop chmod 0755 "${_fname}"; then return 1; fi; diff --git a/subr/rtl.subr b/subr/rtl.subr index 103d6d5d..b123555f 100644 --- a/subr/rtl.subr +++ b/subr/rtl.subr @@ -4,6 +4,8 @@ rtl_basename() { local _fname="${1##*/}"; printf "%s" "${_fname}"; }; rtl_date() { command date "+${1:-${DEFAULT_TIMESTAMP_FMT:-"%Y/%m/%d %H:%M:%S"}}"; }; +rtl_set_IFS_nl() { IFS=" +"; }; rtl_set_var_unsafe() { [ -n "${2}" ] && eval ${1}=\"${2}\" || return 0; }; rtl_test_cmd() { command -v "${1}" >/dev/null; }; rtl_uniq() { if [ "${#}" -gt 0 ]; then printf "%s" "${*}" | sed 's/ /\n/g' | awk '!x[$0]++' | paste -s -d" "; fi; }; diff --git a/subr/rtl_complex.subr b/subr/rtl_complex.subr index 4a055515..cb7c90bd 100644 --- a/subr/rtl_complex.subr +++ b/subr/rtl_complex.subr @@ -73,8 +73,9 @@ rtl_export_vars() { }; rtl_filter_vars() { - local _fn="${1}" _fnfl=0 _qchar="" _var_spec="" _vars="" _vname="" IFS=" -"; for _var_spec in $(set); do + local _fn="${1}" _fnfl=0 _qchar="" _var_spec="" _vars="" _vname="" IFS; + rtl_set_IFS_nl; + for _var_spec in $(set); do case "${_qchar}" in "\"") if [ "${_var_spec%\"}" != "${_var_spec}" ]; then _qchar=""; |