1.add code to support friendly output message.
[mirror_edk2.git] / Tools / Java / Source / ContextTool / org / tianocore / context / ContextMain.java
CommitLineData
987912ad 1/** @file\r
2 File is ContextMain class . \r
3 \r
4Copyright (c) 2006, Intel Corporation\r
5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9 \r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12**/\r
c74c7a43 13package org.tianocore.context;\r
14\r
15public class ContextMain {\r
16 \r
17 public static void main(String[] args) {\r
18\r
f337986f 19 if (TargetFile.validateFilename("target.txt") == false) {\r
c81f5d44 20 String workspacePath = System.getenv("WORKSPACE");\r
21 System.out.printf("%n%s%n", "target.txt can't be found. Please check it in " + workspacePath + "\\Tool\\Conf");\r
f337986f 22 System.exit(0);\r
23 }\r
24 \r
c74c7a43 25 if(ParseParameter.checkParameter(args) == false){\r
26 System.exit(0);\r
27 }\r
f337986f 28 \r
29 if (TargetFile.readFile() == false){\r
30 System.exit(0);\r
31 }\r
32 \r
33 if (ParseParameter.standardizeParameter(args) > 0){\r
34 System.exit(0);\r
35 }\r
36 \r
37 if (TargetFile.createTempFile("target.txt") == false){\r
38 System.exit(0);\r
39 }\r
40 \r
41 if (TargetFile.readwriteFile() == false){\r
c74c7a43 42 System.exit(0);\r
43 }\r
44 \r
c81f5d44 45 String workspacePath = System.getenv("WORKSPACE");\r
46 System.out.printf("%n%s%n", workspacePath + "\\Tool\\Conf\\target.txt is generated successfully!");\r
c74c7a43 47 }\r
48}\r