summary refs log tree commit diff stats
path: root/build_all.sh
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2018-08-08 07:47:17 -0700
committerAndreas Rumpf <rumpf_a@web.de>2018-08-08 16:47:17 +0200
commit506418ef539a9142307235c0cd0183f0d7aec749 (patch)
tree682f50be36ac83e474636c8b0bcea2d1f944bee2 /build_all.sh
parent32b62097a2636c5053d842939d34e2a0fa3f9e33 (diff)
downloadNim-506418ef539a9142307235c0cd0183f0d7aec749.tar.gz
add build_all.sh to allow 1-liner to build development version of the compiler (#8546)
Diffstat (limited to 'build_all.sh')
-rw-r--r--build_all.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/build_all.sh b/build_all.sh
new file mode 100644
index 000000000..cd5ea3d59
--- /dev/null
+++ b/build_all.sh
@@ -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.