]> git.evergreen-ils.org Git - OpenSRF.git/blob - src/java/deps.sh
Bootstrap setuptools, drop unnecessary directory metadata
[OpenSRF.git] / src / java / deps.sh
1 # ----------------------------------------------------------------
2 # Utility script for fetching the OpenSRF Java dependencies
3 # ----------------------------------------------------------------
4
5 . deps.inc
6 STAX=stax-api-1.0.1.jar
7 WSTX=wstx-lgpl-3.2.1.jar
8 MEMCACHE=java_memcached-release_1.5.1.jar
9 JSON=json.zip
10 JSON_ZIP=json.zip
11
12 STAX_URL=http://woodstox.codehaus.org/$STAX
13 WSTX_URL=http://woodstox.codehaus.org/3.2.1/$WSTX
14 MEMCACHE_URL=http://img.whalin.com/memcached/jdk5/standard/$MEMCACHE
15 JSON_URL=http://www.json.org/java/$JSON
16
17 JAVAC="javac -J-Xmx256m"
18 JAVA="java -Xmx256m"
19
20 mkdir -p deps
21 if [ ! -f deps/$STAX ]; then wget $STAX_URL -O deps/$STAX; fi 
22 if [ ! -f deps/$WSTX ]; then wget $WSTX_URL -O deps/$WSTX; fi
23 if [ ! -f deps/$MEMCACHE ]; then wget $MEMCACHE_URL -O deps/$MEMCACHE; fi
24 if [ ! -f deps/$JSON ]; then 
25     mkdir -p deps 
26     cd deps 
27     wget "$JSON_URL"
28     unzip $JSON && $JAVAC org/json/*.java; 
29     jar cf json.jar org
30 fi
31
32
33 if [ -n "$INSTALLDIR" ]; then
34     cp deps/*.jar "$INSTALLDIR"/;
35 else
36     echo ""
37     echo "if you provide an INSTALLDIR setting, the script will go ahead and copy the jars into place"
38     echo "example: INSTALLDIR=/path/to/java $0"
39     echo ""
40 fi