summaryrefslogtreecommitdiff
path: root/src/lua-script/cify.lua
blob: 153feb3d76d51ae3e52a12d82d2b6017f9bb03d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
-- "C"-ify a lua program

output_file = io.open(arg[2], 'w')


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

for line in io.lines(arg[1]) do
   output_file:write('   "'..line..'\\n"\n')
end

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