aboutsummaryrefslogtreecommitdiff
path: root/compile_lib.sh
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-06-04 20:41:20 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-06-04 20:44:58 -0700
commit83183122f180ce0fdbf3b5c1c8ff828d762348a8 (patch)
tree0f536166e9e2169b8aa33a8a8a20ba7e29109950 /compile_lib.sh
parent563e415e07ea45df8c80fc9a2afc652e3e6d8c83 (diff)
Optimizations and cleanup. Build script now fails on first error and
uses the precompiled versions it has just compiled.
Diffstat (limited to 'compile_lib.sh')
-rwxr-xr-xcompile_lib.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/compile_lib.sh b/compile_lib.sh
index 9bf0487..fa932b3 100755
--- a/compile_lib.sh
+++ b/compile_lib.sh
@@ -1,14 +1,16 @@
#!/bin/sh
# This file is a script that converts the .nom files in lib/ into slightly more optimized
# precompiled versions that are only lua> ".." and =lua ".." bits which are faster to load.
+set -e
moonc *.moon
+rm -f core/*.lua lib/*.lua
for file in core/*.nom; do
printf "Compiling $file ..."
- ./nomsu.moon -o "core/$(basename $file .nom).lua" $file
+ lua ./nomsu.lua -O -o "core/$(basename $file .nom).lua" $file
echo "done."
done
for file in lib/*.nom; do
printf "Compiling $file ..."
- ./nomsu.moon -o "lib/$(basename $file .nom).lua" $file
+ lua ./nomsu.lua -O -o "lib/$(basename $file .nom).lua" $file
echo "done."
done