summaryrefslogtreecommitdiff
path: root/lib/genloadlib.sh
blob: f3b825901a289119d181c270ee0fa7a631849470 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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