build.sh 645 B

123456789101112131415161718192021222324
  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, installing it."
  14. wget -c http://www.us.apache.org/dist/maven/maven-3/3.0.5/binaries/apache-maven-3.0.5-bin.tar.gz
  15. tar -zxf apache-maven-3.0.5-bin.tar.gz
  16. CWD=$(pwd)
  17. export MAVEN_HOME="$CWD/apache-maven-3.0.5"
  18. export PATH=$PATH:$MAVEN_HOME/bin
  19. fi
  20. echo "Building Data Generator"
  21. (cd tpcds-gen; make)