gitweb on Svarog

projekti pod git sistemom za održavanje verzija -- projects under the git version control system
mjc2wsl - introduced the --version options and added to help
authorDoni Pracner <quinnuendo@gmail.com>
Fri, 7 Feb 2014 20:24:31 +0000 (21:24 +0100)
committerDoni Pracner <quinnuendo@gmail.com>
Fri, 7 Feb 2014 20:24:31 +0000 (21:24 +0100)
src/mjc2wsl.java

index 9eff3add933badbc57bfa5fd18639bfabb8f0318..67586be2ba144cea3a2b41bc4458aabde355e613 100644 (file)
@@ -671,9 +671,10 @@ public class mjc2wsl{
        }
 
        public void printHelpHelp() {
-               System.out.println("Help options");
+               System.out.println("Help and info options");
                System.out.println("  -h basic help");
                System.out.println("  --help print more detailed help");
+               System.out.println("  --version or -version print version and exit");
        }
        
        public void printUsage(){
@@ -704,6 +705,10 @@ public class mjc2wsl{
                                } else if (args[i].compareTo("--help") == 0) {
                                        printLongHelp();
                                        return;
+                               } else if (args[i].compareTo("--version") == 0 
+                                               || args[i].compareTo("-version") == 0) {
+                                       printVersion();
+                                       return;
                                } else if (args[i].compareTo("-o") == 0
                                                || args[i].startsWith("--oc")) {
                                        if (args[i].length() == 2)
Svarog.pmf.uns.ac.rs/gitweb maintanance Doni Pracner