diff options
author | jjin9 <jjin9@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-11-02 08:55:15 +0000 |
---|---|---|
committer | jjin9 <jjin9@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-11-02 08:55:15 +0000 |
commit | bd2368959084d675d48672f648ce90caa8c25efc (patch) | |
tree | b501dd3ea0b2d067aaa1d7a8d524ba36cdc9d17b /Tools/Java/Source | |
parent | d73196f3298bebecfa6c81b25e7548d188e08c56 (diff) | |
download | edk2-platforms-bd2368959084d675d48672f648ce90caa8c25efc.tar.xz |
Fix the bug EDKT464. ? and * are regarded as wildcard char by OS. so we have to remove the support of /? and -?
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
Diffstat (limited to 'Tools/Java/Source')
-rw-r--r-- | Tools/Java/Source/ContextTool/org/tianocore/context/ContextMain.java | 2 | ||||
-rw-r--r-- | Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java | 61 |
2 files changed, 13 insertions, 50 deletions
diff --git a/Tools/Java/Source/ContextTool/org/tianocore/context/ContextMain.java b/Tools/Java/Source/ContextTool/org/tianocore/context/ContextMain.java index e96bb07fe0..94ea56a5c7 100644 --- a/Tools/Java/Source/ContextTool/org/tianocore/context/ContextMain.java +++ b/Tools/Java/Source/ContextTool/org/tianocore/context/ContextMain.java @@ -43,6 +43,6 @@ public class ContextMain { }
String workspacePath = System.getenv("WORKSPACE");
- System.out.printf("%n%s%n", workspacePath + "\\Tool\\Conf\\target.txt is generated successfully!");
+ System.out.printf("%n%s%n", workspacePath + "\\Tool\\Conf\\target.txt is updated successfully!");
}
}
diff --git a/Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java b/Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java index d58d28b010..24adfb70f1 100644 --- a/Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java +++ b/Tools/Java/Source/ContextTool/org/tianocore/context/ParseParameter.java @@ -29,8 +29,7 @@ public class ParseParameter { return false;
} else {
if( (args[0].compareToIgnoreCase("-h") == 0) || (args[0].compareToIgnoreCase("/h") == 0) ||
- (args[0].compareToIgnoreCase("-?") == 0) || (args[0].compareToIgnoreCase("/?") == 0) ||
- (args[0].compareToIgnoreCase("-help") == 0) || (args[0].compareToIgnoreCase("/help") == 0) ){
+ (args[0].compareToIgnoreCase("--help") == 0) || (args[0].compareToIgnoreCase("/help") == 0) ){
HelpInfo.outputUsageInfo();
return false;
}
@@ -209,58 +208,22 @@ public class ParseParameter { public static boolean outputCurSetting(){
System.out.printf( "%s\n", "The current setting is:" );
+ String[] A = { pstr, tstr, astr, cstr, nstr, mstr, mestr };
+ String[] B = { curpstr, curtstr, curastr, curcstr, curnstr, curmstr, curmestr };
- if(curpstr != null){
- System.out.printf( "%s\n", curpstr );
- }
- else{
- System.out.printf( "%s\n", pstr );
- }
-
- if(curtstr != null){
- System.out.printf( "%s\n", curtstr );
- }
- else{
- System.out.printf( "%s\n", tstr );
- }
-
- if(curastr != null){
- System.out.printf( "%s\n", curastr );
- }
- else{
- System.out.printf( "%s\n", astr );
- }
-
- if(curcstr != null){
- System.out.printf( "%s\n", curcstr );
- }
- else{
- System.out.printf( "%s\n", cstr );
- }
-
- if(curnstr != null){
- System.out.printf( "%s\n", curnstr );
- }
- else{
- System.out.printf( "%s\n", nstr );
- }
-
- if(curmstr != null){
- System.out.printf( "%s\n", curmstr );
- }
- else{
- System.out.printf( "%s\n", mstr );
- }
-
- if(curmstr != null){
- System.out.printf( "%s\n", curmestr );
- }
- else{
- System.out.printf( "%s\n", mestr );
+ for(int i=0; i<A.length; i++){
+ if(B[i] != null){
+ System.out.printf( "%s\n", B[i] );
+ }
+ else{
+ System.out.printf( "%s\n", A[i] );
+ }
+
}
return true;
}
+
public static String pstr = new String("ACTIVE_PLATFORM = ");
public static String tstr = new String("TARGET = ");
|