[izpack-changes] izpack-src/src/lib/com/izforge/izpack/compiler CompilerConfig.java,1.8.2.1,1.8.2.2
miraodb
nobody at sheep.berlios.de
Fri Jan 13 17:36:26 CET 2006
Update of /cvsroot/izpack/izpack-src/src/lib/com/izforge/izpack/compiler
In directory sheep:/tmp/cvs-serv31540/src/lib/com/izforge/izpack/compiler
Modified Files:
Tag: branch-3-8
CompilerConfig.java
Log Message:
Fixes from Olivier Kiddle (FM)
Index: CompilerConfig.java
===================================================================
RCS file: /cvsroot/izpack/izpack-src/src/lib/com/izforge/izpack/compiler/CompilerConfig.java,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -u -d -r1.8.2.1 -r1.8.2.2
--- CompilerConfig.java 3 Jan 2006 13:54:08 -0000 1.8.2.1
+++ CompilerConfig.java 13 Jan 2006 16:36:22 -0000 1.8.2.2
@@ -1714,23 +1714,14 @@
// First check
int nArgs = args.length;
- if (nArgs < 3) throw new Exception("no arguments given");
+ if (nArgs < 1) throw new Exception("no arguments given");
- // We get the IzPack home directory
- int stdArgsIndex;
+ // We get the IzPack home directory
String home = ".";
- if (args[0].equalsIgnoreCase("-HOME"))
- {
- stdArgsIndex = 2;
- home = args[1];
- }
- else
- {
- stdArgsIndex = 0;
- String izHome = System.getProperty("IZPACK_HOME");
- if (izHome != null) home = izHome;
- }
-
+ String izHome = System.getProperty("IZPACK_HOME");
+ if (izHome != null) home = izHome;
+
+
File homeFile = new File(home);
if (!homeFile.exists() && homeFile.isDirectory())
{
@@ -1740,7 +1731,7 @@
Compiler.setIzpackHome(home);
// The users wants to know the command line parameters
- if (args[stdArgsIndex].equalsIgnoreCase("-?"))
+ if (args[0].equalsIgnoreCase("-?"))
{
System.out.println("-> Command line parameters are : (xml file) [args]");
System.out.println(" (xml file): the xml file describing the installation");
@@ -1756,9 +1747,9 @@
System.out.println(" -l (compression-level) : indicates the level for the used compression format");
System.out.println(" if supported. Only integer are valid\n");
- System.out
- .println(" When using vm option -DSTACKTRACE=true there is all kind of debug info ");
+ System.out.println(" When using vm option -DSTACKTRACE=true there is all kind of debug info ");
System.out.println("");
+ exitCode = 0;
}
else
{
@@ -1767,12 +1758,12 @@
// We get the input file name and we initialize the output file
// name
- filename = args[stdArgsIndex];
+ filename = args[0];
// default jar files names are based on input file name
output = filename.substring(0, filename.length() - 3) + "jar";
// We parse the other ones
- int pos = stdArgsIndex + 1;
+ int pos = 1;
while (pos < nArgs)
if ((args[pos].startsWith("-")) && (args[pos].length() == 2))
{
More information about the izpack-changes
mailing list