add build_all.sh to allow 1-liner to build development version of the compiler (#8546)

This commit is contained in:
Timothee Cour 2018-08-08 07:47:17 -07:00 • committed by Andreas Rumpf
commit 506418ef53
2 changed files with 39 additions and 8 deletions

22
build_all.sh Normal file
View file

@ -0,0 +1,22 @@
#! /bin/sh
# build development version of the compiler; can be rerun safely
set -u # error on undefined variables
set -e # exit on first error
echo_run(){
echo "\n$@"
"$@"
}
[ -d csources ] || echo_run git clone --depth 1 https://github.com/nim-lang/csources.git
(
## avoid changing dir in case of failure
echo_run cd csources
echo_run sh build.sh
)
echo_run bin/nim c koch
echo_run ./koch boot -d:release
echo_run ./koch tools # Compile Nimble and other tools.