]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Added more detail to the usage screen.
authorlhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 18 Oct 2006 00:19:35 +0000 (00:19 +0000)
committerlhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 18 Oct 2006 00:19:35 +0000 (00:19 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1783 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Java/Source/CheckTools/src/org/tianocore/CheckTools/CheckTools.java

index 4f61cc6b8839fe88ad58eaed0fafc069f712876a..579c5f50d6e3af58cfe0dd98f13d4fdc4c48b7f0 100644 (file)
@@ -67,6 +67,8 @@ public class CheckTools {
     
     private final int FAIL = 1;
 
+    private String SEP = System.getProperty("file.separator");
+
     public static void main(String[] argv) {
         int exitCode = new CheckTools().checkTool(argv);
         if (exitCode == -1) {
@@ -80,7 +82,6 @@ public class CheckTools {
         String WORKSPACE = System.getenv("WORKSPACE");
         if ((DEBUG > 0) || (VERBOSE > 0))
             System.out.println("Verifying Tool Chains for WORKSPACE: " + WORKSPACE);
-        String SEP = System.getProperty("file.separator");
         int returnCode = 0;
 
         if (WORKSPACE == null) {
@@ -99,15 +100,19 @@ public class CheckTools {
                 if (DEBUG > 1)
                     System.out.println(" [" + i + "] " + arg);
                 if (!(arg.toLowerCase().startsWith("-t") || arg.toLowerCase().startsWith("-s")
-                      || arg.toLowerCase().startsWith("-i") || arg.toLowerCase().startsWith("-v") || arg
-                                                                                                        .toLowerCase()
-                                                                                                        .startsWith(
-                                                                                                                    "-f"))) {
+                      || arg.toLowerCase().startsWith("-i") || arg.toLowerCase().startsWith("-v") 
+                      || arg.toLowerCase().startsWith("-h") || arg.toLowerCase().startsWith("-f"))) {
                     // Only allow valid option flags
                     System.out.println("Invalid argument: " + arg);
                     usage();
                     System.exit(FAIL);
                 }
+
+                if (arg.toLowerCase().startsWith("-h")) {
+                    usage();
+                    System.exit(PASS);
+                }
+
                 if (arg.toLowerCase().startsWith("-t")) {
                     if (cmdCode == DEFAULT) {
                         cmdCode = TEST;
@@ -217,6 +222,17 @@ public class CheckTools {
     }
 
     private void usage() {
-        System.out.println("Usage: checkTools [-i] [-s | -scan] [-t | -test] [[-f | -filename] filename.txt]");
+        System.out.println("Usage: checkTools [-h] [-i] [-v] [-s | -scan] [-t | -test] [[-f | -filename] filename.txt]");
+        System.out.println("  Where");
+        System.out.println("     -h           Help - display this screen.");
+        System.out.println("     -i           Interactive query - not yet implemented!");
+        System.out.println("     -v           Verbose - add up to 3 -v options to increase info messages.");
+        System.out.println("     -s           Scan - search the usual places on your system for tools.");
+        System.out.println("                    The Scan feature not yet implemented!.");
+        System.out.println("     -t           Test - checks that PATH entries in the tool configuration file exist.");
+        System.out.println("     -f filename  Use filename instead of the file specified in target.txt or");
+        System.out.println("                    tools_def.txt or tools_def.template.");
+        System.out.println("                    By Rule, all tool configuration files must reside in the");
+        System.out.println("                    WORKSPACE" + SEP + "Tools" + SEP + "Conf directory.");
     }
 }