- fixing the curl redirect issue

- reduced cut/paste
- starting to load windmill


git-svn-id: http://google-refine.googlecode.com/svn/trunk@398 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Stefano Mazzocchi 2010-04-06 23:28:52 +00:00
parent 1ad122ee47
commit 008cc32d0d

View File

@ -119,7 +119,7 @@ download() {
fi fi
if [ "$CURL" != "" ] ; then if [ "$CURL" != "" ] ; then
curl -o $DEST $URL || exit 1 curl -o -L $DEST $URL || exit 1
fi fi
if [ "$WGET" != "" ] ; then if [ "$WGET" != "" ] ; then
@ -127,6 +127,21 @@ download() {
fi fi
} }
tool_download() {
URL=$1
FILE=$2
DIR=$3
cd $GRIDWORKS_TOOLS_DIR
if [ ! -f "$FILE" ] ; then
download $URL $FILE
fi
if [ ! -d "$DIR" ] ; then
tar xzf $FILE || exit 1
fi
cd ..
}
# ---------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------
build_prepare() { build_prepare() {
@ -176,14 +191,7 @@ launch4j_prepare() {
LAUNCH4J_FILE=`echo $LAUNCH4J_URL | sed 's|.*/||'` LAUNCH4J_FILE=`echo $LAUNCH4J_URL | sed 's|.*/||'`
LAUNCH4J_DIR="launch4j" LAUNCH4J_DIR="launch4j"
cd $GRIDWORKS_TOOLS_DIR tool_download $LAUNCH4J_URL $LAUNCH4J_FILE $LAUNCH4J_DIR
if [ ! -f "$LAUNCH4J_FILE" ] ; then
download $LAUNCH4J_URL $LAUNCH4J_FILE
fi
if [ ! -d "$LAUNCH4J_DIR" ] ; then
tar xzf $LAUNCH4J_FILE || exit 1
fi
cd ..
} }
jarbundler_prepare() { jarbundler_prepare() {
@ -193,16 +201,19 @@ jarbundler_prepare() {
JARBUNDLER_FILE=`echo $JARBUNDLER_URL | sed 's|.*/||'` JARBUNDLER_FILE=`echo $JARBUNDLER_URL | sed 's|.*/||'`
JARBUNDLER_DIR="jarbundler-2.1.0" JARBUNDLER_DIR="jarbundler-2.1.0"
cd $GRIDWORKS_TOOLS_DIR tool_download $JARBUNDLER_URL $JARBUNDLER_FILE $JARBUNDLER_DIR
if [ ! -f "$JARBUNDLER_FILE" ] ; then
download $JARBUNDLER_URL $JARBUNDLER_FILE
fi
if [ ! -d "$JARBUNDLER_DIR" ] ; then
tar xzf $JARBUNDLER_FILE || exit 1
fi
cd ..
} }
windmill_prepare() {
tools_prepare
WINDMILL_URL="http://github.com/windmill/windmill/tarball/1.3beta2"
WINDMILL_FILE="windmill-1.3beta2.tar.gz"
WINDMILL_DIR="windmill-1.3beta2"
tool_download $WINDMILL_URL $WINDMILL_FILE $WINDMILL_DIR
}
findbugs_prepare() { findbugs_prepare() {
tools_prepare tools_prepare