From a596195f6cfb6731f1e778e4bc304028ecd9bf08 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 21 Jan 2019 16:32:13 -0800 Subject: Added 'list' tool and improved install/uninstall --- lib/tools/list.nom | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/tools/list.nom (limited to 'lib/tools/list.nom') diff --git a/lib/tools/list.nom b/lib/tools/list.nom new file mode 100644 index 0000000..3493263 --- /dev/null +++ b/lib/tools/list.nom @@ -0,0 +1,20 @@ +#!/usr/bin/env nomsu +# + A tool to list installed third party Nomsu packages + + Usage: + nomsu -t list + +use "filesystem" +use "commandline" +use "shell" + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +command line program with $args: + $packages = (=sh "ls \$(NOMSU PACKAGEPATH)") + say "Installed packages:" + for $f in ($packages, lines): + if ($f != ""): + $f = ($f, with "%.nom$" -> "") + say " * \$f" -- cgit v1.2.3