5a086c5da76d59aada5254acc936c0277650c096
[roojspacker] / src / main.vala
1 public static int main(string[] args) 
2 {
3         //foreach(var a in args) {
4         //      debug("ARG: %s\n", a);
5         //}
6         
7         var opt_context = new OptionContext ("JSDOC Packer");
8         
9                 try {
10                         opt_context.set_help_enabled (true);
11                         opt_context.add_main_entries (options, null);
12                         if (!opt_context.parse ( ref args)) {
13                                 print("options parse error");
14                                 GLib.Process.exit(Posix.EXIT_FAILURE);
15                         }
16
17                 
18                          
19                 
20                 } catch (OptionError e) {
21                         stdout.printf ("error: %s\n", e.message);
22                         stdout.printf ("Run '%s --help' to see a full list of available command line options.\n %s", 
23                                                  args[0], opt_context.get_help(true,null));
24                         GLib.Process.exit(Posix.EXIT_FAILURE);
25                          
26                 }
27
28         new JSDOC.PackerRun(args);
29         return 0;
30 }