freebsd-ports/devel/lua-luacheck/files/patch-install.lua
Kyle Evans 4581b3525a Add devel/lua-luacheck, linter and static analyzer for lua
Provides linting and static analysis for Lua 5.1, Lua 5.2, Lua 5.3 and
LuaJIT. A patch was required to allow luacheck and luacheck.lua to be
symlinked into ${PREFIX}/bin, which I have submitted upstream.

Checked with:	portlint
Tested with:	Poudriere (head, amd64)
Tested with:	Poudriere (stable/11, amd64)
Tested with:	Poudriere (11.1-R, i386) [lwhsu]
Tested with:	Poudriere (10.4-R, amd64+i386) [lwhsu]
Reviewed by:	lwhsu
Approved by:	lwhsu (ports)
Differential Revision:	https://reviews.freebsd.org/D14467
2018-02-22 14:35:31 +00:00

11 lines
438 B
Lua

--- install.lua.orig 2018-02-22 04:51:23 UTC
+++ install.lua
@@ -76,7 +76,7 @@ else
fh:write(([=[
#!/bin/sh
exec "%s" -e "package.path=[[%s/../src/?.lua;%s/../src/?/init.lua;]]..package.path" "%s/luacheck.lua" "$@"
-]=]):format(args.lua, '$(dirname "$0")', '$(dirname "$0")', '$(dirname "$0")'))
+]=]):format(args.lua, '$(dirname $(realpath "$0"))', '$(dirname $(realpath "$0"))', '$(dirname $(realpath "$0"))'))
end
fh:close()