--- Jay Glanville <[EMAIL PROTECTED]> wrote:
> I've noticed an interesting problem with the shell script that starts
> ant for the UNIX flavours.
>
> If someone sets JAVACMD to an executable WITH parameters, then one line
> in the script fails, the line that goes something like this:
> if [ ! -x $JAVACMD ] ; then ....
> [snip]
> As you can see, the -x test only works if it's tester does not have any
> arguments. Why is this a problem? Well, my JAVACMD looks like this:
> JAVACMD='java -Xmx256m'
> which is perfectly legal (I believe).
>
> Therefore, this patch simply removes code introduced in ant (the shell
> script) version 1.5.
I'm not completely sure the test is all that useful (if JAVACMD ends up
being set to just plain 'java', then unless the user is in the directory
where 'java' lives, the test is going to fail -- so it seems to really be
more a test for JAVA_HOME being set [and should we really be requiring it
is?]). But rather than take the test back out, we might just want to stop
telling people to set JAVACMD this way and instead add the memory-increase
flag to ANT_OPTS, since I suspect that's actually the more correct place
to put that sort of thing. Could you try doing that and see if that works
for you? (Or I suppose we could change the test to something like:
[ ! -x "`echo $JAVACMD | awk '{print $1;}'`" ])
Diane
=====
([EMAIL PROTECTED])
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/