summaryrefslogtreecommitdiffhomepage
path: root/subr/rtl_list.subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-03-13 15:33:05 +0000
committerLucio Andrés Illanes Albornoz <lucio@lucioillanes.de>2020-03-13 15:33:05 +0000
commit60fba634600d0e20726c02d88735cc3d71ff0103 (patch)
treed42d7e13716ccae6e326d3bec8b30fbd3d38b612 /subr/rtl_list.subr
parent4e5750f7ba7c84d09f0e8a60d92a7fc3e7ca410f (diff)
downloadmidipix_build-60fba634600d0e20726c02d88735cc3d71ff0103.tar.bz2
midipix_build-60fba634600d0e20726c02d88735cc3d71ff0103.tar.xz
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.
Diffstat (limited to 'subr/rtl_list.subr')
-rw-r--r--subr/rtl_list.subr5
1 files changed, 5 insertions, 0 deletions
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