equal
deleted
inserted
replaced
21 File.write_backup2(path, text1) |
21 File.write_backup2(path, text1) |
22 } |
22 } |
23 } |
23 } |
24 |
24 |
25 |
25 |
26 /* command line entry point */ |
26 /* Isabelle tool wrapper */ |
27 |
27 |
28 private val headings = |
28 private val headings = |
29 Set("chapter", "section", "subsection", "subsubsection", "paragraph", "subparagraph") |
29 Set("chapter", "section", "subsection", "subsubsection", "paragraph", "subparagraph") |
30 |
30 |
31 def main(args: Array[String]) |
31 val isabelle_tool = |
32 { |
32 Isabelle_Tool("update_header", "replace obsolete theory header command", args => |
33 Command_Line.tool0 { |
33 { |
34 var section = "section" |
34 var section = "section" |
35 |
35 |
36 val getopts = Getopts(""" |
36 val getopts = Getopts(""" |
37 Usage: isabelle update_header [FILES|DIRS...] |
37 Usage: isabelle update_header [FILES|DIRS...] |
38 |
38 |
55 |
55 |
56 for { |
56 for { |
57 spec <- specs |
57 spec <- specs |
58 file <- File.find_files(Path.explode(spec).file, file => file.getName.endsWith(".thy")) |
58 file <- File.find_files(Path.explode(spec).file, file => file.getName.endsWith(".thy")) |
59 } update_header(section, Path.explode(File.standard_path(file))) |
59 } update_header(section, Path.explode(File.standard_path(file))) |
60 } |
60 }) |
61 } |
|
62 } |
61 } |