2000-01-13 10:42:41 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2006-09-01 20:04:18 +00:00
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership.
|
|
|
|
# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
# (the "License"); you may not use this file except in compliance with
|
|
|
|
# the License. You may obtain a copy of the License at
|
2004-10-06 14:58:45 +00:00
|
|
|
#
|
2006-09-01 20:04:18 +00:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2004-10-06 14:58:45 +00:00
|
|
|
#
|
2006-09-01 20:04:18 +00:00
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
2002-01-10 14:18:42 +00:00
|
|
|
|
2003-02-16 01:12:14 +00:00
|
|
|
# OS specific support. $var _must_ be set to either true or false.
|
2002-01-07 12:00:36 +00:00
|
|
|
cygwin=false;
|
2003-02-16 01:12:14 +00:00
|
|
|
darwin=false;
|
2002-01-07 12:00:36 +00:00
|
|
|
case "`uname`" in
|
|
|
|
CYGWIN*) cygwin=true ;;
|
2003-02-16 01:12:14 +00:00
|
|
|
Darwin*) darwin=true
|
|
|
|
if [ -z "$JAVA_HOME" ] ; then
|
2003-08-11 13:18:19 +00:00
|
|
|
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
|
2003-02-16 01:12:14 +00:00
|
|
|
fi
|
|
|
|
;;
|
2002-01-07 12:00:36 +00:00
|
|
|
esac
|
|
|
|
|
2001-01-30 15:08:30 +00:00
|
|
|
REALANTHOME=$ANT_HOME
|
2003-11-24 09:27:00 +00:00
|
|
|
if [ -z "$PWD" ]; then
|
2003-11-10 16:48:56 +00:00
|
|
|
ANT_HOME=./bootstrap
|
|
|
|
else
|
2003-11-24 09:27:00 +00:00
|
|
|
ANT_HOME="$PWD"/bootstrap
|
2003-11-10 16:48:56 +00:00
|
|
|
fi
|
2001-01-30 15:08:30 +00:00
|
|
|
export ANT_HOME
|
2001-01-23 05:10:39 +00:00
|
|
|
|
2001-01-31 09:42:04 +00:00
|
|
|
if test ! -f bootstrap/lib/ant.jar -o ! -x bootstrap/bin/ant -o ! -x bootstrap/bin/antRun ; then
|
2001-01-31 06:15:03 +00:00
|
|
|
/bin/sh ./bootstrap.sh
|
2003-08-11 13:18:19 +00:00
|
|
|
fi
|
2000-07-01 23:33:54 +00:00
|
|
|
|
2001-08-06 10:24:03 +00:00
|
|
|
if test ! -f bootstrap/lib/ant.jar -o ! -x bootstrap/bin/ant -o ! -x bootstrap/bin/antRun ; then
|
|
|
|
echo Bootstrap FAILED
|
2006-10-04 15:45:50 +00:00
|
|
|
exit 1
|
2001-08-06 10:24:03 +00:00
|
|
|
fi
|
|
|
|
|
2001-01-30 15:08:30 +00:00
|
|
|
if [ "$REALANTHOME" != "" ] ; then
|
2003-04-15 19:56:20 +00:00
|
|
|
if $cygwin; then
|
2004-02-24 21:01:19 +00:00
|
|
|
REALANTHOME=`cygpath --windows "$REALANTHOME"`
|
2003-04-15 19:56:20 +00:00
|
|
|
fi
|
2001-01-31 06:15:03 +00:00
|
|
|
ANT_INSTALL="-Dant.install=$REALANTHOME"
|
2003-02-18 14:34:36 +00:00
|
|
|
else
|
|
|
|
ANT_INSTALL="-emacs"
|
2001-01-23 05:10:39 +00:00
|
|
|
fi
|
|
|
|
|
2004-10-07 15:40:47 +00:00
|
|
|
bootstrap/bin/ant -nouserlib -lib lib/optional "$ANT_INSTALL" $*
|
2001-01-23 14:07:13 +00:00
|
|
|
|