summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eshtrans/bootstrap.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/eshtrans/bootstrap.sh b/eshtrans/bootstrap.sh
new file mode 100644
index 0000000..00b8072
--- /dev/null
+++ b/eshtrans/bootstrap.sh
@@ -0,0 +1,18 @@
+printf 'Stage 1\n'
+printf 'main "${@}"\n' | cat $(find * -type f -a -name '*.esh') - >stage1.sh
+
+printf 'Stage 2\n'
+>stage2.sh
+for f in $(find * -type f -a -name '*.esh'); do
+ echo compiling "$f"
+ time -p sh stage1.sh "$f" >>stage2.sh
+done
+printf 'main "${@}"\n' >>stage2.sh
+
+printf 'Stage 3\n'
+>stage3.sh
+for f in $(find * -type f -a -name '*.esh'); do
+ echo compiling "$f"
+ time -p sh stage2.sh "$f" >>stage3.sh
+done
+printf 'main "${@}"\n' >>stage3.sh