aboutsummaryrefslogtreecommitdiff
path: root/compile_lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 'compile_lib.sh')
-rwxr-xr-xcompile_lib.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/compile_lib.sh b/compile_lib.sh
index c38cf87..30de701 100755
--- a/compile_lib.sh
+++ b/compile_lib.sh
@@ -1,4 +1,18 @@
#!/bin/sh
+FLUSH=false
+while getopts ":f" opt; do
+ case $opt in
+ f)
+ FLUSH=true
+ echo "flushing..."
+ ;;
+ esac
+done
+if [ "$FLUSH" = true ] ; then
+ for file in $(find lib/ -name "*.nom.lua") ; do
+ rm $file
+ done
+fi
for file in $(find lib/ -name "*.nom") ; do
luafile="$file.lua"
if [ ! -e "$luafile" ] || [ "$file" -nt "$luafile" ] ; then