Allow user or squishy file to specify custom shebang

Sun, 26 Jul 2009 14:50:05 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sun, 26 Jul 2009 14:50:05 +0100
changeset 28
99ec02c56716
parent 27
0718b469099d
child 29
0737a3bcf10b

Allow user or squishy file to specify custom shebang

squish.lua file | annotate | diff | comparison | revisions
--- a/squish.lua	Sun Jul 26 14:47:05 2009 +0100
+++ b/squish.lua	Sun Jul 26 14:50:05 2009 +0100
@@ -145,7 +145,11 @@
 local f = io.open(out_fn, "w+");
 
 if opts.executable then
-	f:write("#!/usr/bin/env lua\n");
+	if opts.executable == true then
+		f:write("#!/usr/bin/env lua\n");
+	else
+		f:write(opts.executable, "\n");
+	end
 end
 
 if enable_debug then

mercurial