src/main.vala
authorAlan Knowles <alan@roojs.com>
Wed, 5 Jul 2017 02:19:40 +0000 (10:19 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 5 Jul 2017 02:19:40 +0000 (10:19 +0800)
src/main.vala

index e69de29..5a086c5 100644 (file)
@@ -0,0 +1,30 @@
+public static int main(string[] args) 
+{
+       //foreach(var a in args) {
+       //      debug("ARG: %s\n", a);
+       //}
+       
+       var opt_context = new OptionContext ("JSDOC Packer");
+       
+               try {
+                       opt_context.set_help_enabled (true);
+                       opt_context.add_main_entries (options, null);
+                       if (!opt_context.parse ( ref args)) {
+                               print("options parse error");
+                               GLib.Process.exit(Posix.EXIT_FAILURE);
+                       }
+
+               
+                        
+               
+               } catch (OptionError e) {
+                       stdout.printf ("error: %s\n", e.message);
+                       stdout.printf ("Run '%s --help' to see a full list of available command line options.\n %s", 
+                                                args[0], opt_context.get_help(true,null));
+                       GLib.Process.exit(Posix.EXIT_FAILURE);
+                        
+               }
+
+       new JSDOC.PackerRun(args);
+       return 0;
+}
\ No newline at end of file