(************************************************************ update_ocaml.ml Created : Tue Dec 2 22:32:18 2003 Last modified: Tue Dec 02 22:48:12 2003 Compile: ocamlc unix.cma str.cma mytcp.ml url.ml base64.ml http.ml update_ocaml.ml -o update_ocaml # FTP Directory: sources/ocaml # ************************************************************) (*let url_base_string = "http://caml.inria.fr/ocaml/"*) (** もっと HTML の知識と処理を !! base の取得 etc ... *) let url_base_string = "http://caml.inria.fr/distrib/ocaml-3.07/" let url_string = "http://caml.inria.fr/ocaml/distrib-3.07.html" let regexp = Str.regexp_case_fold "source.*distribution" let get_archive_filename () = let (_, c) = Http.get (Url.of_string url_string) in ignore (Str.search_forward regexp c 0); Str.matched_group 1 c ;; let _ = let archive_filename = get_archive_filename () in print_endline ("filename: " ^ archive_filename); ignore (Unix.system ("wget -O \"" ^ archive_filename ^ "\" "^url_base_string^archive_filename)); ignore (Unix.system ("tar xfvz "^archive_filename)); ignore (Unix.system (" ( cd ocaml-3.07 ; ./configure && make world && make opt ) ")) ;; (* Local Variables: namazu-default-dir: "/home/tak/.labltk_namazu /home/tak/.ocaml_namazu" End: *)