tpcds-build.sh 890 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. # Check for all the stuff I need to function.
  3. for f in gcc; do
  4. which $f > /dev/null 2>&1
  5. if [ $? -ne 0 ]; then
  6. echo "Required program $f is missing. Please install it and try again."
  7. exit 1
  8. fi
  9. done
  10. # Check if Maven is installed and install it if not.
  11. which mvn > /dev/null 2>&1
  12. if [ $? -ne 0 ]; then
  13. echo "Maven not found, automatically installing it."
  14. 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
  15. if [ $? -ne 0 ]; then
  16. echo "Failed to download Maven, check Internet connectivity and try again."
  17. exit 1
  18. fi
  19. tar -zxf apache-maven-3.0.5-bin.tar.gz > /dev/null
  20. CWD=$(pwd)
  21. export MAVEN_HOME="$CWD/apache-maven-3.0.5"
  22. export PATH=$PATH:$MAVEN_HOME/bin
  23. fi
  24. echo "Building TPC-DS Data Generator"
  25. (cd tpcds-gen; make)
  26. echo "TPC-DS Data Generator built, you can now use tpcds-setup.sh to generate data."