#!/usr/bin/env bash
# Build Path: /app/.heroku/vendor/

OUT_PREFIX=$1

# Use new path, containing autoconf.
export PATH="/app/.heroku/python/bin/:$PATH"
hash -r


echo "Building gdal..."

SOURCE_TARBALL='http://download.osgeo.org/gdal/1.11.1/gdal-1.11.1.tar.gz'

curl -L $SOURCE_TARBALL | tar zx

cd gdal-1.11.1
./configure --prefix=$OUT_PREFIX  &&
make
make install

# Cleanup
cd ..
