diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-12-18 19:23:20 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-12-18 19:24:37 -0800 |
| commit | 94740a9b414a0fd9af70acb9b8bf3b9576b537e1 (patch) | |
| tree | d0b18232b285d3f5216dce195fb06b6f3685b070 /tools/upgrade.nom | |
| parent | ad09f002e84d0e317c9563784b829f6f0102e994 (diff) | |
Improved command line interface and robustness of tools.
Diffstat (limited to 'tools/upgrade.nom')
| -rwxr-xr-x | tools/upgrade.nom | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/upgrade.nom b/tools/upgrade.nom index 9244203..96a1312 100755 --- a/tools/upgrade.nom +++ b/tools/upgrade.nom @@ -11,12 +11,11 @@ use "lib/consolecolor.nom" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -$args = (command line args) -$inplace = ($args."-i" or $args."--inplace") -$start_version = $args."--upgrade-from" -$version = ($args."--upgrade-to" or (Nomsu version)) -$test = ($args."-t" or $args."--test") -for $filename in $args.extra_args: +$inplace = ($(COMMAND LINE ARGS)."-i" or $(COMMAND LINE ARGS)."--inplace") +$start_version = $(COMMAND LINE ARGS)."--upgrade-from" +$version = ($(COMMAND LINE ARGS)."--upgrade-to" or (Nomsu version)) +$test = ($(COMMAND LINE ARGS)."-t" or $(COMMAND LINE ARGS)."--test") +for $filename in $(COMMAND LINE ARGS).extras: $file = (read file $filename) unless $file: barf "File does not exist: \$filename" |
