2017-10-08 18:23:48 -07:00
|
|
|
#!/bin/sh
|
2017-12-18 16:45:46 -08:00
|
|
|
# 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.
|
2018-06-04 20:41:20 -07:00
|
|
|
set -e
|
2018-05-24 21:16:51 -07:00
|
|
|
moonc *.moon
|
2018-06-04 20:41:20 -07:00
|
|
|
rm -f core/*.lua lib/*.lua
|
2018-02-02 15:48:28 -08:00
|
|
|
for file in core/*.nom; do
|
2018-01-24 01:37:52 -08:00
|
|
|
printf "Compiling $file ..."
|
2018-06-12 18:04:18 -07:00
|
|
|
luajit ./nomsu.lua -O -o "core/$(basename $file .nom).lua" $file
|
2018-01-16 01:45:43 -08:00
|
|
|
echo "done."
|
2017-10-08 18:23:48 -07:00
|
|
|
done
|
2018-02-02 15:48:28 -08:00
|
|
|
for file in lib/*.nom; do
|
|
|
|
printf "Compiling $file ..."
|
2018-06-12 18:04:18 -07:00
|
|
|
luajit ./nomsu.lua -O -o "lib/$(basename $file .nom).lua" $file
|
2018-02-02 15:48:28 -08:00
|
|
|
echo "done."
|
|
|
|
done
|