From e665d9725c4bb02f4c18d16527367f424cb880fa Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 20 Mar 2019 15:55:57 -0700 Subject: Auto-updated to 7.0.0 syntax and removed some shims. --- lib/tools/uninstall.nom | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'lib/tools/uninstall.nom') diff --git a/lib/tools/uninstall.nom b/lib/tools/uninstall.nom index 90a8477..f5dbaa3 100755 --- a/lib/tools/uninstall.nom +++ b/lib/tools/uninstall.nom @@ -1,5 +1,6 @@ -#!/usr/bin/env nomsu -V6 -# +#!/usr/bin/env nomsu -V7.0.0 + +### A tool to uninstall third party Nomsu packages (the inverse of the install tool) Usage: @@ -23,16 +24,16 @@ use "shell" command line program with $args: $searchpath = - [ - : for $ in ["?.lua", "?/init.lua", "?.nom", "?/init.nom"]: + [: + for $ in ["?.lua", "?/init.lua", "?.nom", "?/init.nom"]: add "\$(NOMSU PACKAGEPATH)\$" ], joined with ";" - + for $package_name in $args.extras: $path = ($package.searchpath $package_name $package.nomsupath "/") unless $path: say "Sorry, couldn't find \$package_name in \$(NOMSU PACKAGEPATH)" exit 1 $path = ($path, with "/init%.nom" -> "") - unless ((ask "Do you want to delete \$path? [Y/n] ") == "n"): - run command "rm -rv \$path" + unless ((ask "Do you want to delete \($path)? [Y/n] ") == "n"): + run command "rm -rv \$path" \ No newline at end of file -- cgit v1.2.3