Bug 28101 - bootstrap.sh fails::qsh has limited space when running shell command.
Summary: bootstrap.sh fails::qsh has limited space when running shell command.
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Build Process (show other bugs)
Version: 1.6.1
Hardware: Other other
: P3 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2004-03-31 17:32 UTC by Stephen More
Modified: 2009-07-30 05:49 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen More 2004-03-31 17:32:07 UTC
The current bootstrap.sh fails when running under qsh on the as400. I think the 
command is limited to 256 characters in length.

Please find below the fix to bootstrap.sh that will work under the qsh on the 
400.

-Steve More


echo ... Compiling Ant Classes

for X in `ls ${TOOLS}/bzip2/*.java \
        ${TOOLS}/tar/*.java ${TOOLS}/zip/*.java \
        ${TOOLS}/ant/util/regexp/RegexpMatcher.java \
        ${TOOLS}/ant/util/regexp/RegexpMatcherFactory.java \
        ${TOOLS}/ant/types/*.java \
        ${TOOLS}/ant/*.java ${TOOLS}/ant/taskdefs/*.java \
        ${TOOLS}/ant/taskdefs/compilers/*.java \
        ${TOOLS}/ant/taskdefs/condition/*.java`
do
        "${JAVAC}" $BOOTJAVAC_OPTS -d ${CLASSDIR} $X 
        ret=$?
        if [ $ret != 0 ]; then  
          echo ... Failed compiling Ant classes !
          exit $ret
        fi
done
Comment 1 Matt Benson 2004-04-01 22:37:11 UTC
This looks okay, but if there is a way to detect qsh, I'd rather see something 
like:
<pre>
parallel=true

if some-way-to-determine qsh ; then
  parallel=false
fi

sourcefiles=${TOOLS}/bzip2/*.java \
            ${TOOLS}/tar/*.java ${TOOLS}/zip/*.java \
            ${TOOLS}/ant/util/regexp/RegexpMatcher.java \
            ${TOOLS}/ant/util/regexp/RegexpMatcherFactory.java \
            ${TOOLS}/ant/types/*.java \
            ${TOOLS}/ant/*.java ${TOOLS}/ant/taskdefs/*.java \
            ${TOOLS}/ant/taskdefs/compilers/*.java \
            ${TOOLS}/ant/taskdefs/condition/*.java

if $parallel ; then
  ret=0
  for X in $sourcefiles ; do
    if [ $ret == 0 ] ; then
      "${JAVAC}" $BOOTJAVAC_OPTS -d ${CLASSDIR} $X 
      ret=$?
    fi
  done
else
  "${JAVAC}" $BOOTJAVAC_OPTS -d ${CLASSDIR} $X $sourcefiles
  ret=$?
fi

if [ $ret != 0 ]; then  
  echo ... Failed compiling Ant classes !
  exit $ret
fi
</pre>

-just being nitpicky to avoid multiple invocations of the compiler except when 
necessary.
Comment 2 Stephen More 2004-04-02 13:42:41 UTC
OK, This should work then:

> echo $0             
  QSHELL/QZSHSH