diff options
author | lhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-10-18 00:19:35 +0000 |
---|---|---|
committer | lhauch <lhauch@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-10-18 00:19:35 +0000 |
commit | 641cd03cea3267e081a0fe83131c325e78348da5 (patch) | |
tree | 410c89b3d24d3f504f00e27a48c07810d8302764 /Tools/Java | |
parent | a8e1928c2fa3706cc79cfb94acc25fb6ef8a1860 (diff) | |
download | edk2-platforms-641cd03cea3267e081a0fe83131c325e78348da5.tar.xz |
Added more detail to the usage screen.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1783 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Tools/Java')
-rw-r--r-- | Tools/Java/Source/CheckTools/src/org/tianocore/CheckTools/CheckTools.java | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/Tools/Java/Source/CheckTools/src/org/tianocore/CheckTools/CheckTools.java b/Tools/Java/Source/CheckTools/src/org/tianocore/CheckTools/CheckTools.java index 4f61cc6b88..579c5f50d6 100644 --- a/Tools/Java/Source/CheckTools/src/org/tianocore/CheckTools/CheckTools.java +++ b/Tools/Java/Source/CheckTools/src/org/tianocore/CheckTools/CheckTools.java @@ -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."); } } |