aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2017-10-13 16:10:23 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2017-10-13 16:10:23 -0700
commit1083273b9f422783a0976cba9ccd4316fd4c3860 (patch)
tree6441e43fd7ba9dfa65b6973e4c05cb3cd4ee3edb
parent1822df2b1a0edf27bfc7410f523fd683560d669e (diff)
Added -f option to force rebuilds (for when the compiler changes, not
the lib files).
-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