|
|
@@ -12,11 +12,20 @@ done
|
|
|
# Check if Maven is installed and install it if not.
|
|
|
which mvn > /dev/null 2>&1
|
|
|
if [ $? -ne 0 ]; then
|
|
|
- echo "Maven not found, automatically installing it."
|
|
|
- curl -O http://www.us.apache.org/dist/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz 2> /dev/null
|
|
|
- if [ $? -ne 0 ]; then
|
|
|
- echo "Failed to download Maven, check Internet connectivity and try again."
|
|
|
- exit 1
|
|
|
+ SKIP=0
|
|
|
+ if [ -e "apache-maven-3.0.5-bin.tar.gz" ]; then
|
|
|
+ SIZE=`du -b apache-maven-3.0.5-bin.tar.gz | cut -f 1`
|
|
|
+ if [ $SIZE -eq 5144659 ]; then
|
|
|
+ SKIP=1
|
|
|
+ fi
|
|
|
+ fi
|
|
|
+ if [ $SKIP -ne 1 ]; then
|
|
|
+ echo "Maven not found, automatically installing it."
|
|
|
+ curl -O http://www.us.apache.org/dist/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz 2> /dev/null
|
|
|
+ if [ $? -ne 0 ]; then
|
|
|
+ echo "Failed to download Maven, check Internet connectivity and try again."
|
|
|
+ exit 1
|
|
|
+ fi
|
|
|
fi
|
|
|
tar -zxf apache-maven-3.0.5-bin.tar.gz > /dev/null
|
|
|
CWD=$(pwd)
|
|
|
@@ -24,6 +33,6 @@ if [ $? -ne 0 ]; then
|
|
|
export PATH=$PATH:$MAVEN_HOME/bin
|
|
|
fi
|
|
|
|
|
|
-echo "Building TPC-H Data Generator"
|
|
|
+echo "Building TPC-DS Data Generator"
|
|
|
(cd tpch-gen; make)
|
|
|
echo "TPC-H Data Generator built, you can now use tpch-setup.sh to generate data."
|