diff options
Diffstat (limited to 'subr')
-rw-r--r-- | subr/ex_pkg_env.subr | 2 | ||||
-rw-r--r-- | subr/pkg_install.subr | 2 | ||||
-rw-r--r-- | subr/rtl_list.subr | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/subr/ex_pkg_env.subr b/subr/ex_pkg_env.subr index ca701296..8cd58f74 100644 --- a/subr/ex_pkg_env.subr +++ b/subr/ex_pkg_env.subr @@ -73,7 +73,7 @@ exp_pkg_env_set() { "$(rtl_toupper "PKG_${_pkg_name}")")"; fi; done; - IFS0="${IFS}"; IFS=":"; for _vname in ${PKG_ENV_VARS_EXTRA:-}; do + IFS0="${IFS:- }"; IFS=":"; for _vname in ${PKG_ENV_VARS_EXTRA:-}; do export "${_vname}"; done; IFS="${IFS0}"; if [ "${_nounset:-0}" -eq 0 ]; then diff --git a/subr/pkg_install.subr b/subr/pkg_install.subr index ef3fed28..1f9f1d9d 100644 --- a/subr/pkg_install.subr +++ b/subr/pkg_install.subr @@ -3,7 +3,7 @@ # pkg_install() { - local _fname="" _ifs_old="${IFS}" _pkglist_name="" IFS; + local _fname="" _ifs_old="${IFS:- }" _pkglist_name="" IFS; if ! rtl_fileop mkdir "${PKG_PREFIX}"; then return 1; else IFS=" diff --git a/subr/rtl_list.subr b/subr/rtl_list.subr index c4c563bf..515681bc 100644 --- a/subr/rtl_list.subr +++ b/subr/rtl_list.subr @@ -3,7 +3,7 @@ # rtl_lconcat() { - local _list="${1}" _litem_new="${2}" _sep="${3:- }" IFS="${3:-${IFS}}"; + local _list="${1}" _litem_new="${2}" _sep="${3:- }" IFS="${3:-${IFS:- }}"; if [ -n "${_list}" ]; then printf "%s%s%s" "${_list}" "${_sep}" "${_litem_new}"; else @@ -12,7 +12,7 @@ rtl_lconcat() { }; rtl_lfilter() { - local _list="${1}" _filter="${2}" _sep="${3:- }" IFS="${3:-${IFS}}" \ + local _list="${1}" _filter="${2}" _sep="${3:- }" IFS="${3:-${IFS:- }}"\ _filterfl="" _litem="" _litem_filter="" _lnew=""; if [ -z "${_filter}" ]; then printf "%s" "${_list}"; return 0; @@ -31,7 +31,7 @@ rtl_lfilter() { }; rtl_llength() { - local _list="${1}" _sep="${2:- }" IFS="${2:-${IFS}}" _litem="" _llength=0; + local _list="${1}" _sep="${2:- }" IFS="${2:-${IFS:- }}" _litem="" _llength=0; for _litem in ${_list}; do : $((_llength+=1)); done; @@ -60,7 +60,7 @@ rtl_lmax() { }; rtl_lsearch() { - local _list="${1}" _filter="${2}" _sep="${3:- }" IFS="${3:-${IFS}}" \ + local _list="${1}" _filter="${2}" _sep="${3:- }" IFS="${3:-${IFS:- }}"\ _litem="" _litem_filter="" _lnew=""; if [ -z "${_filter}" ]; then printf "%s" "${_list}"; return 0; |