]> matita.cs.unibo.it Git - helm.git/blobdiff - matitaB/matita/matitaFilesystem.ml
Update online helper entries
[helm.git] / matitaB / matita / matitaFilesystem.ml
index 1ea3cbb94267204b899d0497392d36eca0ea1dff..8f969750ba78c34dfe59bddd4673b5da909bcb07 100644 (file)
@@ -25,6 +25,9 @@
 
 exception SvnError of string;;
 
+(* disable for debugging *)
+let prerr_endline _ = ()
+
 let exec_process cmd =
   let (stdout, stdin, stderr) as chs = Unix.open_process_full cmd [||] in
   let outlines = ref [] in
@@ -174,7 +177,10 @@ let checkout user =
   let rt_dir = Helm_registry.get "matita.rt_base_dir" in
   let repo = Helm_registry.get "matita.weblib" in
 
-  let errno, outlines, errlines = exec_process 
+  let errno, outlines, errlines = 
+    prerr_endline
+    ("svn co --non-interactive " ^ repo ^ " " ^ rt_dir ^ "/users/" ^ user ^ "/");
+     exec_process 
     ("svn co --non-interactive " ^ repo ^ " " ^ rt_dir ^ "/users/" ^ user ^ "/")
   in
   let files, anomalies = 
@@ -244,6 +250,7 @@ let html_of_library uid ft =
       List.filter (fun x -> String.sub x 0 1 <> ".") 
         (Array.to_list (Sys.readdir (basedir ^ "/" ^ path))) in
     let subdirs = List.filter (fun x -> Sys.is_directory (gpath x)) dirlist in
+    let subdirs = List.sort String.compare subdirs in
 
     (* only .ma scripts, hidden files excluded *)
     let scripts = 
@@ -254,6 +261,7 @@ let html_of_library uid ft =
           not (Sys.is_directory (gpath x)) && 
           (String.sub x 0 1 <> ".") && (String.sub x i len = ".ma")
         with Not_found | Invalid_argument _ -> false) dirlist in
+    let scripts = List.sort String.compare scripts in
     let subdirtags = 
       String.concat "\n" (List.map (fun x -> aux (normalize_qfn (lpath x ^ "/"))) subdirs) in
     let scripttags =