1 #!@TERMUX_PREFIX@/bin/sh
3 # Licensed to the Apache Software Foundation (ASF) under one or more
4 # contributor license agreements. See the NOTICE file distributed with
5 # this work for additional information regarding copyright ownership.
6 # The ASF licenses this file to You under the Apache License, Version 2.0
7 # (the "License"); you may not use this file except in compliance with
8 # the License. You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
20 # Extract launch and ant arguments, (see details below).
26 if [ "$arg" = "--noconfig" ] ; then
28 elif [ "$arg" = "--execdebug" ] ; then
30 elif [ my"$arg" = my"--h" -o my"$arg" = my"--help" ] ; then
32 ant_exec_args="$ant_exec_args -h"
34 if [ my"$arg" = my"-h" -o my"$arg" = my"-help" ] ; then
37 ant_exec_args="$ant_exec_args \"$arg\""
41 if [ -z "$ANT_HOME" ]; then
42 ANT_HOME=@TERMUX_PREFIX@/share/ant
45 if ! $no_config ; then
46 if [ -f "$HOME/.ant/ant.conf" ] ; then
49 if [ -f "$HOME/.antrc" ] ; then
54 ANT_LIB="${ANT_HOME}/lib"
56 if [ -z "$LOCALCLASSPATH" ] ; then
57 LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar
59 LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH
62 # Show script help if requested
64 echo $0 '[script options] [options] [target [target2 [target3] ..]]'
65 echo 'Script Options:'
66 echo ' --help, --h print this message and ant help'
67 echo ' --noconfig suppress sourcing of /etc/ant.conf,'
68 echo ' $HOME/.ant/ant.conf, and $HOME/.antrc'
69 echo ' configuration files'
70 echo ' --execdebug print ant exec line generated by this'
75 # Execute ant using eval/exec to preserve spaces in paths, java options, and ant args
77 ant_exec_command="exec dalvikvm $ANT_OPTS -classpath \"$LOCALCLASSPATH\" -Dant.home=\"$ANT_HOME\" -Dant.library.dir=\"$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"$CLASSPATH\""
78 if $ant_exec_debug ; then
79 echo $ant_exec_command $ant_exec_args
81 eval $ant_exec_command "$ant_exec_args"