diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-01-21 16:32:13 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-01-21 16:32:13 -0800 |
| commit | a596195f6cfb6731f1e778e4bc304028ecd9bf08 (patch) | |
| tree | 72f3874939161457f91bc2e26b829b0cd775378c /lib/tools | |
| parent | a9f8d2d8ac4093d04daf98c36804a1edd20c9af4 (diff) | |
Added 'list' tool and improved install/uninstall
Diffstat (limited to 'lib/tools')
| -rwxr-xr-x | lib/tools/install.nom | 2 | ||||
| -rw-r--r-- | lib/tools/list.nom | 20 | ||||
| -rwxr-xr-x | lib/tools/uninstall.nom | 1 |
3 files changed, 22 insertions, 1 deletions
diff --git a/lib/tools/install.nom b/lib/tools/install.nom index 3af8da6..c3505a3 100755 --- a/lib/tools/install.nom +++ b/lib/tools/install.nom @@ -41,7 +41,7 @@ download [ sh> $cmd ..if it fails: say (" - Sorry, the uninstall failed. You may need to re-run as root with `sudo` in front of the command. + Sorry, the install failed. You may need to re-run as root with `sudo` in front of the command. ") exit 1 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" diff --git a/lib/tools/uninstall.nom b/lib/tools/uninstall.nom index 881705a..1201c73 100755 --- a/lib/tools/uninstall.nom +++ b/lib/tools/uninstall.nom @@ -1,3 +1,4 @@ +#!/usr/bin/env nomsu # A tool to uninstall third party Nomsu packages (the inverse of the install tool) |
