]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix the bug EDKT464. ? and * are regarded as wildcard char by OS. so we have to remov...
authorjjin9 <jjin9@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 2 Nov 2006 08:55:15 +0000 (08:55 +0000)
committerjjin9 <jjin9@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 2 Nov 2006 08:55:15 +0000 (08:55 +0000)
To show the help info, ContextTool only support: -h, /h, --help, /help.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1887 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Java/Source/ContextTool/org/tianocore/context/ContextMain.java
Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java

index e96bb07fe058e18bd10a7411f53f4e1d7533dc71..94ea56a5c74e65c1df2e4061a21712b7b958be04 100644 (file)
@@ -43,6 +43,6 @@ public class ContextMain {
         }\r
         \r
         String workspacePath = System.getenv("WORKSPACE");\r
-        System.out.printf("%n%s%n", workspacePath + "\\Tool\\Conf\\target.txt is generated successfully!");\r
+        System.out.printf("%n%s%n", workspacePath + "\\Tool\\Conf\\target.txt is updated successfully!");\r
     }\r
 }\r
index d58d28b01087103bf5961c638df294766dd91aef..24adfb70f1f21f88a5f448a4d235a8a04374d29b 100644 (file)
@@ -29,8 +29,7 @@ public class ParseParameter {
             return false;\r
         } else {\r
             if( (args[0].compareToIgnoreCase("-h") == 0) || (args[0].compareToIgnoreCase("/h") == 0) || \r
-                (args[0].compareToIgnoreCase("-?") == 0) || (args[0].compareToIgnoreCase("/?") == 0) || \r
-                (args[0].compareToIgnoreCase("-help") == 0) || (args[0].compareToIgnoreCase("/help") == 0) ){\r
+                (args[0].compareToIgnoreCase("--help") == 0) || (args[0].compareToIgnoreCase("/help") == 0) ){\r
                 HelpInfo.outputUsageInfo();\r
                 return false;\r
             }\r
@@ -209,58 +208,22 @@ public class ParseParameter {
     public static boolean outputCurSetting(){\r
         \r
         System.out.printf( "%s\n", "The current setting is:" );\r
+        String[] A = { pstr, tstr, astr, cstr, nstr, mstr, mestr };\r
+        String[] B = { curpstr, curtstr, curastr, curcstr, curnstr, curmstr, curmestr };\r
         \r
-        if(curpstr != null){\r
-            System.out.printf( "%s\n", curpstr );\r
-        }\r
-        else{\r
-            System.out.printf( "%s\n", pstr );\r
-        }\r
-        \r
-        if(curtstr != null){\r
-            System.out.printf( "%s\n", curtstr );\r
-        }\r
-        else{\r
-            System.out.printf( "%s\n", tstr );\r
-        }\r
-        \r
-        if(curastr != null){\r
-            System.out.printf( "%s\n", curastr );\r
-        }\r
-        else{\r
-            System.out.printf( "%s\n", astr );\r
-        }\r
-        \r
-        if(curcstr != null){\r
-            System.out.printf( "%s\n", curcstr );\r
-        }\r
-        else{\r
-            System.out.printf( "%s\n", cstr );\r
-        }\r
-        \r
-        if(curnstr != null){\r
-            System.out.printf( "%s\n", curnstr );\r
-        }\r
-        else{\r
-            System.out.printf( "%s\n", nstr );\r
-        }\r
-        \r
-        if(curmstr != null){\r
-            System.out.printf( "%s\n", curmstr );\r
-        }\r
-        else{\r
-            System.out.printf( "%s\n", mstr );\r
-        }\r
-        \r
-        if(curmstr != null){\r
-            System.out.printf( "%s\n", curmestr );\r
-        }\r
-        else{\r
-            System.out.printf( "%s\n", mestr );\r
+        for(int i=0; i<A.length; i++){\r
+            if(B[i] != null){\r
+                System.out.printf( "%s\n", B[i] );\r
+            }\r
+            else{\r
+                System.out.printf( "%s\n", A[i] );\r
+            }\r
+            \r
         }\r
         \r
         return true;\r
     }\r
+\r
     \r
     public static String pstr = new String("ACTIVE_PLATFORM                     = ");\r
     public static String tstr = new String("TARGET                              = ");\r