aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2018-11-09 17:02:39 -0800
committerBruce Hill <bruce@bruce-hill.com>2018-11-09 17:02:53 -0800
commitfa3f598fc3b91d92665fda293460944f75c95b67 (patch)
treea5d19eac16d81873ab51171bdd5670793baa4ff8 /tools
parent69aaea030e08e083151aa25b8080eddd0d4c1683 (diff)
Fixing the upgrade pipeline, plus some misc. fixes.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/upgrade.nom6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/upgrade.nom b/tools/upgrade.nom
index 4975aad..a937e46 100755
--- a/tools/upgrade.nom
+++ b/tools/upgrade.nom
@@ -40,14 +40,16 @@ repeat:
for %path in %args:
for file %filename in %path:
unless (%filename::matches "%.nom$"): do next %filename
- %tree = (parse (read file %filename) from %filename)
+ %file = (read file %filename)
+ %code = (%NomsuCode::from (%Source %filename 1 (size of %file)) %file)
+ %tree = (%code parsed)
%uptree = (..)
%tree upgraded from (%start_version or (%tree.version or (Nomsu version))) to %version
%text = "\
..#!/usr/bin/env nomsu -V\%version
\(%uptree as nomsu)"
- if:
+ when:
%inplace:
say "Upgraded \%filename"
write %text to file %filename