diff options
Diffstat (limited to 'subr')
-rw-r--r-- | subr/build_init.subr | 4 | ||||
-rw-r--r-- | subr/rtl_list.subr | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/subr/build_init.subr b/subr/build_init.subr index 7cce5da3..42a5328e 100644 --- a/subr/build_init.subr +++ b/subr/build_init.subr @@ -20,8 +20,8 @@ buildp_init_args() { ALL) ARG_RESTART_AT=ALL; ARG_RESTART_RECURSIVE=2; ;; LAST) ARG_RESTART_AT=ALL; ARG_RESTART_RECURSIVE=0; ;; "") ;; - *:*) ARG_RESTART_AT="${ARG_RESTART#*:}"; ARG_RESTART="$(echo "${ARG_RESTART%%:*}" | sed "s/,/ /g")"; ;; - *) ARG_RESTART="$(echo "${ARG_RESTART}" | sed "s/,/ /g")"; ARG_RESTART_AT=ALL; ;; + *:*) ARG_RESTART_AT="${ARG_RESTART#*:}"; ARG_RESTART="$(rtl_llift "${ARG_RESTART%%:*}" "," " ")"; ;; + *) ARG_RESTART="$(rtl_llift "${ARG_RESTART}" "," " ")"; ARG_RESTART_AT=ALL; ;; esac; if [ "${ARG_RESTART}" = "LAST" ]; then if [ -n "${DEFAULT_BUILD_LAST_FAILED_PKG_FNAME}" ]\ diff --git a/subr/rtl_list.subr b/subr/rtl_list.subr index 056d8016..479b0fd4 100644 --- a/subr/rtl_list.subr +++ b/subr/rtl_list.subr @@ -38,6 +38,12 @@ rtl_llength() { echo "${_llength}"; }; +rtl_llift() { + local _list="${1}" _sep="${2}" _sep_new="${3}" IFS; IFS="${_sep}"; + set -- ${_list}; IFS="${_sep_new}"; + echo "${*}"; +}; + rtl_lmatch() { local _list="${1}" _item="${2}" _sep="${3}"; [ -n "$(rtl_lsearch "${_list}" "${_item}" "${_sep}")" ]; |