Permalink
Browse files

Download and push a binary dist of Apache Ant onto the user's path if…

… -a is specified.
  • Loading branch information...
1 parent c0902b3 commit 6a0ca93ae7b5070f61cca4be2d96a29d184a48ef @esammer esammer committed with Aug 3, 2010
Showing with 18 additions and 0 deletions.
  1. +18 −0 run.sh
View
18 run.sh
@@ -5,6 +5,20 @@
set -x
+ANT_VERSION="1.8.1"
+ANT_TARBALL="apache-ant-${ANT_VERSION}-bin.tar.gz"
+ANT_TARBALL_URL="http://www.gtlib.gatech.edu/pub/apache/ant/binaries/${ANT_TARBALL}"
+
+setup_ant() {
+ wget -P "${BINDIR}/build" "${ANT_TARBALL_URL}"
+ tar -C "${BINDIR}/build" -zxf "${BINDIR}/build/apache-ant-${ANT_VERSION}-bin.tar.gz"
+
+ ANT_HOME="${BINDIR}/build/apache-ant-${ANT_VERSION}"
+ PATH="${ANT_HOME}/bin:${PATH}"
+
+ export PATH ANT_HOME
+}
+
display_help() {
echo "usage: $0 [-h][-D][-R][-a][-p <project>][-u <name>][-e <addr>][-H <host>][-r <release>][--svn-rev <rev>]"
echo -e "
@@ -207,6 +221,10 @@ if [ ! -e $CHECKOUT_TAR ]; then
popd
fi
+if [ -n "${_opt_handle_ant}" ] ; then
+ setup_ant
+fi
+
##############################
# RPM
##############################

0 comments on commit 6a0ca93

Please sign in to comment.