diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-20 20:27:15 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-20 20:27:27 -0700 |
| commit | 6728587dfc6a5f4090f2673113ffedb2be924daf (patch) | |
| tree | 77591abacd8760bedaa30110570613ef263220fe /tools/upgrade.nom | |
| parent | c9df1bc3e881b2ebcf5808a0db7bea29cd07c849 (diff) | |
Auto-formatted and auto-upgraded everything!
Diffstat (limited to 'tools/upgrade.nom')
| -rwxr-xr-x | tools/upgrade.nom | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tools/upgrade.nom b/tools/upgrade.nom index 016e5b9..a505aaa 100755 --- a/tools/upgrade.nom +++ b/tools/upgrade.nom @@ -1,3 +1,4 @@ +#!/usr/bin/env nomsu -V2.5.4.3 #!/usr/bin/env Nomsu -V2.4.4.3 use "core" use "compatibility" @@ -8,25 +9,30 @@ use "lib/os.nom" if (%args.1 is "-i"): %inplace = (yes) remove index 1 from %args + if (%args.1 is "-t"): use "lib/consolecolor.nom" %test = (yes) remove index 1 from %args + for %path in %args: if (%path is "-i"): %inplace = (yes) for file %filename in %path: %tree = (parse (read file %filename) from %filename) %uptree = (%tree upgraded) - %text = "#!/usr/bin/env nomsu -V\(Nomsu version)\n\(%uptree as nomsu)" + %text = ".." + #!/usr/bin/env nomsu -V\(Nomsu version) + \(%uptree as nomsu) + if: %inplace: say "Upgraded \%filename" write %text to file %filename + %test: if (%uptree == %tree): say (dim "\%filename will not be changed") ..else: say (bright "\%filename will be changed") - else: - say %text - + + else: say %text
\ No newline at end of file |
