summaryrefslogtreecommitdiff
path: root/src/lua-script/cify.lua
blob: a2fbcbee7d23548faaa0be438849754fbb4ad640 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/lua

-- "C"-ify a lua program

output_file = io.open('script.h', 'w')


output_file:write('const char *argent_script =\n')

for line in io.lines('script.lua') do
   output_file:write('   "'..line..'\\n"\n')
end

output_file:write(';')
output_file:close()