From 60fba634600d0e20726c02d88735cc3d71ff0103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Fri, 13 Mar 2020 15:33:05 +0000 Subject: Implements ./pkgtool.sh -[irt] options. etc/{README.md,pkgtool.usage}: updated. subr/ex_pkg.subr:ex_pkg_{find_package,get_packages}(): initial implementation. subr/ex_pkg.subr:ex_pkg_unfold_{,r}depends(): split from ex_pkg_expand_packages(). subr/ex_pkg{,_dispatch}.subr: removes ${EX_PKG_COMPLETE} scoped global. subr/ex_pkg_dispatch.subr:exp_pkg_dispatch_expand_packages(): split from subr/ex_pkg.subr. subr/rtl_list.subr:rtl_lsort(): initial implementation. --- subr/rtl_list.subr | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'subr/rtl_list.subr') diff --git a/subr/rtl_list.subr b/subr/rtl_list.subr index 479b0fd4..f57a3ee9 100644 --- a/subr/rtl_list.subr +++ b/subr/rtl_list.subr @@ -65,6 +65,11 @@ rtl_lsearch() { echo "${_lnew}"; }; +rtl_lsort() { + local _list="${1}" _sep="${2:- }"; + printf "%s" "${_list}" | tr "${_sep}" "\n" | sort | paste -s -d "${_sep}"; +}; + rtl_lunfold_depends() { local _vname_template="${1}" _depends="" _name="" _names=""; shift; for _name in "${@}"; do -- cgit v1.2.3