[Pkg-ocaml-maint-commits] [SCM] oasis2debian project branch, master, updated. 997c03825f19116afc2b13537c75fe54aa52604f

Sylvain Le Gall gildor at debian.org
Fri Mar 8 07:33:48 UTC 2013


The following commit has been merged in the master branch:
commit c1e9250ae98baa8b879bbbc91b6d84f37d202d3d
Author: Christophe Troestler <Christophe.Troestler at umons.ac.be>
Date:   Sun Nov 18 14:03:56 2012 +0100

    Slightly improve the "help" action.

diff --git a/src/ActHelp.ml b/src/ActHelp.ml
index b88516a..be6546d 100644
--- a/src/ActHelp.ml
+++ b/src/ActHelp.ml
@@ -1,9 +1,13 @@
+open Printf
 
-(** Display help 
-  *)
+(** Display help *)
+let run ~ctxt args =
+  eprintf "%s <command> where command is one of\n"
+          (Filename.basename Sys.argv.(0));
+  eprintf "  init\n";
+  eprintf "  get\n";
+  eprintf "  update  update the Debian files for a new version of _oasis.\n";
+  eprintf "  help    display this help.\n"
 
-let run ~ctxt args = 
-  prerr_endline "Help"
-
-let display ~ctxt _ = 
-  prerr_endline "Coucou"
+let display ~ctxt _ =
+  prerr_endline (Filename.basename Sys.argv.(0))
diff --git a/src/Main.ml b/src/Main.ml
index 684fdb7..6949ce4 100644
--- a/src/Main.ml
+++ b/src/Main.ml
@@ -51,7 +51,7 @@ let () =
                 ActHelp.run
             | str ->
                 ActHelp.display ~ctxt stderr;
-                error ~ctxt "No action %s defined" str;
+                error ~ctxt "No action %s defined.  Try \"help\"." str;
                 exit 2
         in
           run ~ctxt args

-- 
oasis2debian project



More information about the Pkg-ocaml-maint-commits mailing list