Package: geneweb / 5.02~cvs20091031-8

010_gwsetup-fhs Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Goal: Allow configuring various paths in gwsetup

Status wrt upstream: Forwarded in the Geneweb ML

Index: b/setup/setup.ml
===================================================================
--- a/setup/setup.ml	2009-11-08 17:26:10.000000000 +0100
+++ b/setup/setup.ml	2009-11-08 17:26:27.000000000 +0100
@@ -6,6 +6,8 @@
 value port = ref 2316;
 value default_lang = ref "en";
 value setup_dir = ref ".";
+value only_dir = ref ".";
+value comm_log = ref ".";
 value bin_dir = ref "";
 value lang_param = ref "";
 value only_file = ref "";
@@ -319,7 +321,7 @@
 ;
 
 value only_file_name () =
-  if only_file.val = "" then Filename.concat setup_dir.val "only.txt"
+  if only_file.val = "" then Filename.concat only_dir.val "only.txt"
   else only_file.val
 ;
 
@@ -710,7 +712,7 @@
 ;
 
 value exec_f comm =
-  let s = comm ^ " > " ^ "comm.log" in
+  let s = comm ^ " > " ^ comm_log.val in
   do {
     eprintf "$ cd \"%s\"\n" (Sys.getcwd ());
     flush stderr;
@@ -835,7 +837,7 @@
 
 value gwc conf =
   let rc =
-    let comm = stringify (Filename.concat bin_dir.val "gwc") in
+    let comm = "gwc" in
     exec_f (comm ^ parameters conf.env)
   in
   let rc = IFDEF WIN95 THEN infer_rc conf rc ELSE rc END in
@@ -1055,7 +1057,7 @@
       Sys.chdir dir;
       let c =
         Filename.concat bin_dir.val src_to_new ^ " " ^ tmp ^ " -f -o " ^
-          out_file ^ " > " ^ "comm.log"
+          out_file ^ " > " ^ comm_log.val
       in
       eprintf "$ %s\n" c;
       flush stderr;
@@ -1138,7 +1140,7 @@
     Sys.rename in_base_dir (Filename.concat "old" in_base_dir);
     let c =
       Filename.concat bin_dir.val "gwc" ^ " tmp.gw -nofail -o " ^ in_base ^
-        " > comm.log "
+        " > " ^ comm_log.val
     in
     eprintf "$ %s\n" c;
     flush stderr;
@@ -1262,7 +1264,7 @@
               (fun s b ->
                  if s = "" then " " ^ b ^ ".gw" else s ^ " -sep " ^ b ^ ".gw")
               "" bases ^
-            " -f -o " ^ out_file ^ " > comm.log"
+            " -f -o " ^ out_file ^ " > " ^ comm_log.val
         in
         eprintf "$ %s\n" c;
         flush stderr;
@@ -1783,8 +1785,12 @@
       string_of_int port.val ^ "); > 1024 for normal users.");
    ("-only", Arg.String (fun s -> only_file.val := s),
     "<file>: File containing the only authorized address");
+   ("-only", Arg.String (fun x -> only_dir.val := x),
+    "<string>: directory for gwsetup_only.txt file") ;
+   ("-log", Arg.String (fun x -> comm_log.val := x),
+    "<string>: full path for last command log file") ;
    ("-gd", Arg.String (fun x -> setup_dir.val := x),
-    "<string>: gwsetup directory");
+    "<string>: geneweb share directory") ;
    ("-bindir", Arg.String (fun x -> bin_dir.val := x),
     "<string>: binary directory (default = value of option -gd)") ::
    IFDEF SYS_COMMAND THEN