cabal-heroku-buildpack/scripts/functions
2012-02-20 23:27:13 -06:00

31 lines
593 B
Text

function indent() {
c='s/^/ /'
case $(uname) in
Darwin) sed -l "$c";;
*) sed -u "$c";;
esac
}
function clearEnvironment() {
unset GIT_DIR
}
function downloadAndExtract() {
mkdir -p $1 && curl $2 -o - | tar jxf - -C $1
}
function configureMakeInstall() {
pushd $1;
echo -n "Info: ./configure --prefix=$2 && make && make install";
./configure --prefix=$2 && make && make install;
echo "[OK]";
popd;
}
function mkCompilerDir() {
local compilerDir=$CACHE_DIR/compilers/$1;
[[ ! -d "$compilerDir" ]]; mkdir -p $compilerDir;
echo $compilerDir;
}