#!/usr/bin/env bash # bin/compile set -e set -o pipefail BUILD_DIR=$1 CACHE_DIR=$2 function indent() { c='s/^/ /' case $(uname) in Darwin) sed -l "$c";; *) sed -u "$c";; esac } cd $BUILD_DIR # configure if [ -f configure ]; then echo "-----> Configuring" ./configure 2>&1 | indent fi # make echo "-----> Compiling with Make" make 2>&1 | indent