aboutsummaryrefslogtreecommitdiff
path: root/compile_lib.sh
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-02-02 15:48:28 -0800
committerBruce Hill <bitbucket@bruce-hill.com>2018-02-02 15:49:42 -0800
commit505fec2a61d2571317cc4bbc36ec0f4822a63f9d (patch)
treec2b37e9db8e2f958fbca0caa0a9c4924912a37a9 /compile_lib.sh
parent513c721198b2256235a95c98d161ab1bb51e6671 (diff)
Restructured the nomsu files to group all the essentials into core/ and
all the optionals into lib/. lib/core.nom and tests/all.nom are no longer needed now.
Diffstat (limited to 'compile_lib.sh')
-rwxr-xr-xcompile_lib.sh18
1 files changed, 10 insertions, 8 deletions
diff --git a/compile_lib.sh b/compile_lib.sh
index 8cdfcdb..1dc9d07 100755
--- a/compile_lib.sh
+++ b/compile_lib.sh
@@ -11,20 +11,22 @@ while getopts ":f" opt; do
esac
done
if [ "$FLUSH" = true ] ; then
- for file in $(find lib/ -name "*.lua") ; do
- rm $file
- done
+ rm core/*.lua
+ rm lib/*.lua
+ rm tests/*.lua
fi
-printf "Compiling lib/core.nom ..."
-./nomsu.moon -c lib/core.nom
-echo "done."
-for file in $(cat lib/core.nom | lua -e "for filename in io.read('*a'):gmatch('use \"([^\"]*)\"') do print(filename) end") ; do
+for file in core/*.nom; do
printf "Compiling $file ..."
./nomsu.moon -c $file
echo "done."
done
-for file in $(cat tests/all.nom | lua -e "for filename in io.read('*a'):gmatch('run file \"([^\"]*)\"') do print(filename) end") ; do
+for file in lib/*.nom; do
+ printf "Compiling $file ..."
+ ./nomsu.moon -c $file
+ echo "done."
+done
+for file in tests/*.nom; do
printf "Compiling $file ..."
./nomsu.moon -c $file
echo "done."