Last active
December 19, 2015 00:08
-
-
Save gvvaughan/5866136 to your computer and use it in GitHub Desktop.
Patch upstream luarocks-2.0.13 for parallel Lua interpreter installations per http://lua-users.org/wiki/LuaRocksConfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Makefile b/Makefile | |
index 67c3ce0..2d149c7 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -81,8 +81,13 @@ | |
for f in $(BIN_FILES) ;\ | |
do \ | |
sed "1d" src/bin/$$f > src/bin/$$f.bak ;\ | |
- echo "#!$(LUA_BINDIR)/lua$(LUA_SUFFIX)" > src/bin/$$f ;\ | |
- echo "package.path = [[$(LUADIR)/?.lua;$(LUADIR)/?/init.lua;]]..package.path" >> src/bin/$$f ;\ | |
+ printf '%s\n' \ | |
+ '#!/bin/sh' \ | |
+ 'SH=--[[' \ | |
+ 'exec "$${LUA-$(LUA_BINDIR)/lua$(LUA_SUFFIX)}" "$$0" $${1+"$$@"}' \ | |
+ ']]SH' \ | |
+ 'package.path = [[$(LUADIR)/?.lua;$(LUADIR)/?/init.lua;]]..package.path' \ | |
+ > src/bin/$$f ;\ | |
cat src/bin/$$f.bak >> src/bin/$$f ;\ | |
chmod +x src/bin/$$f ;\ | |
rm -f src/bin/$$f.bak ;\ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment