Updated build script.

This commit is contained in:
Bruce Hill 2017-12-30 14:32:39 -08:00
parent 4789892824
commit 3fbfc85e04

View File

@ -11,13 +11,13 @@ while getopts ":f" opt; do
esac esac
done done
if [ "$FLUSH" = true ] ; then if [ "$FLUSH" = true ] ; then
for file in $(find lib/ -name "*compiled.nom") ; do for file in $(find lib/ -name "*.nomc") ; do
rm $file rm $file
done done
fi fi
for file in $(cat lib/core.nom | lua -e "for filename in io.read('*a'):gmatch('require \"([^\"]*)\"') do print(filename) end") ; do for file in $(cat lib/core.nom | lua -e "for filename in io.read('*a'):gmatch('require \"([^\"]*)\"') do print(filename) end") ; do
compilefile="${file/\.nom/.compiled.nom}" compilefile="${file/\.nom/.nomc}"
if [ ! -e "$compilefile" ] || [ "$file" -nt "$compilefile" ] ; then if [ ! -e "$compilefile" ] || [ "$file" -nt "$compilefile" ] ; then
echo "Compiling $file into $compilefile" echo "Compiling $file into $compilefile"
./nomsu.moon -c $file ./nomsu.moon -c $file