-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sh
executable file
·40 lines (32 loc) · 1.05 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
# $Id: build.sh,v 1.1 2002/03/26 08:45:17 aslom Exp $
# You can set JAVA_HOME to point ot JDK 1.3
# or shell will try to deterine java location using which
# IMPPORTANT: and make sure that JAVA_HOME\lib contains tools.jar !!!!
#
# No need to modify anything after this line.
# --------------------------------------------------------------------
if [ -z "$JAVA_HOME" ] ; then
JAVA=`/usr/bin/which java`
if [ -z "$JAVA" ] ; then
echo "Cannot find JAVA. Please set your PATH."
exit 1
fi
JAVA_BIN=`dirname $JAVA`
JAVA_HOME=$JAVA_BIN/..
else
JAVA=$JAVA_HOME/bin/java
fi
echo "JAVA=$JAVA"
#if [ ! "`$JAVA -version 2>&1 | grep "\ 1\.3"`" ]; then
#if [ ! "`$JAVA -version 2>&1 | egrep "\ 1\.[3456789].*"`" ]; then
# echo Required 1.3 or better version of JDK: can not use $JAVA
# echo Current version is:
# $JAVA -version
# exit 1
#fi
#echo setting LOCALCLASSPATH
LOCALCLASSPATH=`/bin/sh $PWD/classpath.sh build`
CMD="$JAVA $OPTS -classpath $LOCALCLASSPATH org.apache.tools.ant.Main $@ -buildfile build.xml"
echo $CMD
$CMD