root/gs2-extensions/parallel-building/trunk/src/src/CASCADE-MAKE/HADOOPGREENSTONEINGEST.sh @ 30299

Revision 30299, 0.7 KB (checked in by jmt12, 5 years ago)

Making the removal of the jar file conditional on it actually being there :P

  • Property svn:executable set to *
Line 
1#!/bin/bash
2
3package=HadoopGreenstoneIngest
4version=
5
6progname=$0
7
8source ../cascade-make/lib/cascade-lib.bash GEXTPARALLELBUILDING ../.. $*
9
10prefix=$GEXTPARALLELBUILDING_INSTALLED
11
12library_jar_path="${GEXTPARALLELBUILDING_INSTALLED}/lib/hadoop-greenstone.jar"
13
14# Can't build HadoopGreenstoneIngest without Greenstone
15if [ "${HADOOP_VERSION}x" != "x" ]
16then
17    if [ -f "${library_jar_path}" ]
18    then
19    rm "${library_jar_path}"
20    fi
21    pushd ${GEXTPARALLELBUILDING}/src/java/org/nzdl/gsdl/
22    rm -rf hgi_classes
23    mkdir hgi_classes
24    javac -cp $HADOOP_PREFIX/hadoop-core-$HADOOP_VERSION.jar -d hgi_classes *.java
25    jar -cvf "${library_jar_path}" -C hgi_classes/ .
26    popd
27else
28    echo "No Hadoop version specified... skipping!"
29fi
Note: See TracBrowser for help on using the browser.