143 return false, "Module not found. Re-squish with --use-http option to fetch it from "..url; |
143 return false, "Module not found. Re-squish with --use-http option to fetch it from "..url; |
144 end |
144 end |
145 end |
145 end |
146 |
146 |
147 print_info("Writing "..out_fn.."..."); |
147 print_info("Writing "..out_fn.."..."); |
148 local f = io.open(out_fn, "w+"); |
148 local f, err = io.open(out_fn, "w+"); |
|
149 if not f then |
|
150 print_err("Couldn't open output file: "..tostring(err)); |
|
151 os.exit(1); |
|
152 end |
149 |
153 |
150 if opts.executable then |
154 if opts.executable then |
151 if opts.executable == true then |
155 if opts.executable == true then |
152 f:write("#!/usr/bin/env lua\n"); |
156 f:write("#!/usr/bin/env lua\n"); |
153 else |
157 else |