aboutsummaryrefslogtreecommitdiff
path: root/lib/tools/list.nom
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-01-21 16:32:13 -0800
committerBruce Hill <bruce@bruce-hill.com>2019-01-21 16:32:13 -0800
commita596195f6cfb6731f1e778e4bc304028ecd9bf08 (patch)
tree72f3874939161457f91bc2e26b829b0cd775378c /lib/tools/list.nom
parenta9f8d2d8ac4093d04daf98c36804a1edd20c9af4 (diff)
Added 'list' tool and improved install/uninstall
Diffstat (limited to 'lib/tools/list.nom')
-rw-r--r--lib/tools/list.nom20
1 files changed, 20 insertions, 0 deletions
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"