summaryrefslogtreecommitdiff
path: root/lib/genloadlib.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/genloadlib.sh')
-rwxr-xr-xlib/genloadlib.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/genloadlib.sh b/lib/genloadlib.sh
new file mode 100755
index 0000000..f3b8259
--- /dev/null
+++ b/lib/genloadlib.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+ls *.lua | while read f ; do
+ b=${f%%.*}
+ echo "extern unsigned int size_$b;"
+ echo "extern unsigned char $b[];"
+ echo
+ echo " Buffer ${b}_buff;"
+ echo " ${b}_buff.write($b, size_$b);"
+ echo " L->load(&${b}_buff);"
+ echo
+ echo
+done