--- /dev/null
+let read_from_stdin = ref false;;
+
+let uri_of_filename fn =
+ let uri =
+ Str.replace_first (Str.regexp (Str.quote Configuration.helm_dir)) "cic:" fn
+ in
+ let uri' = Str.replace_first (Str.regexp "\.xml$") "" uri in
+ UriManager.uri_of_string uri'
+;;
+
+let main() =
+ Deannotate.expect_possible_parameters := true ;
+ let files = ref [] in
+ Arg.parse
+ ["-stdin", Arg.Set read_from_stdin, "Read from stdin"]
+ (fun x -> files := (x, uri_of_filename x) :: !files)
+ "
+usage: experiment file ...
+
+List of options:";
+ if !read_from_stdin then
+ begin
+ try
+ while true do
+ let l = Str.split (Str.regexp " ") (read_line ()) in
+ List.iter (fun x -> files := (x, uri_of_filename x) :: !files) l
+ done
+ with
+ End_of_file -> ()
+ end ;
+ files := List.rev !files;
+ Getter.update () ;
+ print_endline "ATTENTION: have you changed servers.txt so that you'll try \
+ to repair your own objs instead of others'?" ;
+ flush stdout ;
+ List.iter
+ (function (fn, uri) ->
+ print_string (UriManager.string_of_uri uri) ;
+ flush stdout ;
+ (try
+ CicFindParameters.fix_params uri (Some fn)
+ with
+ e -> print_newline () ; flush stdout ; raise e ) ;
+ print_endline " OK!" ;
+ flush stdout
+ ) !files
+;;
+
+main();;