ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jay Glanville" <>
Subject [PATCH] changes to ant start script for UNIX
Date Tue, 15 May 2001 11:30:52 GMT
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 ....

To prove this, I wrote a test script.  It goes like this:
	if [ -x "$cmd" ] ; then
	    echo "first command found"
	    echo "first command not found"
	cmd="a a";
	if [ -x "$cmd" ] ; then
	    echo "second command found"
	    echo "second command not found"
I have a second script in the same directory, called "a".  The output of my
test gave me the following:
	07:20:55 $ b
	first command found
	second command not found
	07:20:59 $
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.


Jay Dickon Glanville
P068 - SiteManager Development, Nortel Networks
613-765-1144 (ESN 395-1144)
MS: 045/55/A05

View raw message