Commits

Paweł Wieczorek committed 5893daf

added license command

Comments (0)

Files changed (2)

src/Command/Command_License.ml

+(*
+ * Opifex
+ *
+ * Copyrights(C) 2012,2013 by Pawel Wieczorek <wieczyk at gmail>
+ *)
+
+open Batteries
+open CommandTree.Type
+
+(*********************************************************************************************************************
+ *
+ ********************************************************************************************************************)
+
+module LicenseCommand : Command = struct
+
+    type flag = ()
+
+    let options = []
+
+    let name = "license"
+
+    let title = "Print license"
+
+    let description = "Prints license."
+
+    let action _ _ = 
+        print_endline Predefined.license;
+        0
+end

src/Command/Command_MainList.ml

 open Batteries
 open CommandTree.Type
 open Command_About
+open Command_License
 
 (*********************************************************************************************************************
  *
  ********************************************************************************************************************)
 
 let main_commands =
-    [ Leaf (module AboutCommand : Command) ]
+    [ Leaf (module AboutCommand : Command)
+    ; Leaf (module LicenseCommand : Command)
+    ]