equal
deleted
inserted
replaced
80 File.write_backup2(path, text2) |
80 File.write_backup2(path, text2) |
81 } |
81 } |
82 } |
82 } |
83 |
83 |
84 |
84 |
85 /* command line entry point */ |
85 /* Isabelle tool wrapper */ |
86 |
86 |
87 def main(args: Array[String]) |
87 val isabelle_tool = |
88 { |
88 Isabelle_Tool("update_cartouches", "update theory syntax to use cartouches", args => |
89 Command_Line.tool0 { |
89 { |
90 var replace_comment = false |
90 var replace_comment = false |
91 var replace_text = false |
91 var replace_text = false |
92 |
92 |
93 val getopts = Getopts(""" |
93 val getopts = Getopts(""" |
94 Usage: isabelle update_cartouches [FILES|DIRS...] |
94 Usage: isabelle update_cartouches [FILES|DIRS...] |
110 |
110 |
111 for { |
111 for { |
112 spec <- specs |
112 spec <- specs |
113 file <- File.find_files(Path.explode(spec).file, file => file.getName.endsWith(".thy")) |
113 file <- File.find_files(Path.explode(spec).file, file => file.getName.endsWith(".thy")) |
114 } update_cartouches(replace_comment, replace_text, Path.explode(File.standard_path(file))) |
114 } update_cartouches(replace_comment, replace_text, Path.explode(File.standard_path(file))) |
115 } |
115 }) |
116 } |
|
117 } |
116 } |