summaryrefslogtreecommitdiffhomepage
path: root/subr/ex_rtl_list.subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-02-25 21:16:30 +0000
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-02-25 21:16:30 +0000
commit763157f89f9332cee928ded934643529b541d2ca (patch)
treee4ffdc45b9a3de3e7dd644bc4f5c617e6e39bc0d /subr/ex_rtl_list.subr
parent797b89106d8f50dd0d91110387bd81dc8a8f45be (diff)
downloadmidipix_build-763157f89f9332cee928ded934643529b541d2ca.tar.bz2
midipix_build-763157f89f9332cee928ded934643529b541d2ca.tar.xz
subr/ex_pkg_dispatch.subr:exp_pkg_check_depends(): apply ex_rtl_uniq() to expanded package list.
subr/ex_{pkg_dispatch,rtl_list}.subr: splits ex_rtl_lunfold_depends().
Diffstat (limited to 'subr/ex_rtl_list.subr')
-rw-r--r--subr/ex_rtl_list.subr13
1 files changed, 13 insertions, 0 deletions
diff --git a/subr/ex_rtl_list.subr b/subr/ex_rtl_list.subr
index 45a641c6..fb2bde72 100644
--- a/subr/ex_rtl_list.subr
+++ b/subr/ex_rtl_list.subr
@@ -59,4 +59,17 @@ ex_rtl_lsearch() {
echo "${_lnew}";
};
+ex_rtl_lunfold_depends() {
+ local _vname_template="${1}" _depends="" _name="" _names=""; shift;
+ for _name in "${@}"; do
+ if _depends="$(ex_rtl_get_var_unsafe -u "$(eval printf \"%s\" \""${_vname_template}"\")")"\
+ && [ -n "${_depends}" ]; then
+ _depends="$(ex_rtl_lunfold_depends "${_vname_template}" ${_depends})";
+ _names="$(ex_rtl_lconcat "${_names}" "${_depends}")";
+ fi;
+ _names="$(ex_rtl_lconcat "${_names}" "${_name}")";
+ done;
+ echo "${_names}";
+};
+
# vim:filetype=sh