1
1
mirror of https://github.com/aelve/guide.git synced 2025-01-08 23:39:18 +03:00

Add ./b, a build script

This commit is contained in:
Artyom 2017-01-31 00:46:02 +03:00
parent 076feaf37f
commit c7ae23838c
No known key found for this signature in database
GPG Key ID: B8E35A33FF522710

21
b Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -e
args=''
test=false
for var in "$@"
do
if [[ $var == "-t" ]]; then
test=true
else
args="$args $var"
fi
done
stack build --ghc-options="+RTS -A256m -n2m -RTS" --test --no-run-tests --no-haddock-deps --bench --no-run-benchmarks --jobs=4 --dependencies-only
stack build --fast --ghc-options="-j4 +RTS -A256m -n2m -RTS" --test --no-run-tests --no-haddock-deps --bench --no-run-benchmarks --jobs=4 2>&1 | perl -pe '$|++; s/(.*) Compiling\s([^\s]+)\s+\(\s+([^\/]+).*/\1 \2/p' | grep -E --color "(^.*warning.*$|^.*error.*$|^ .*$)|"
if [[ $test == true ]]; then
stack build --fast --ghc-options="-j4 +RTS -A256m -n2m -RTS" --test --no-haddock-deps --bench --no-run-benchmarks --jobs=4
fi