zlua: use REPLACE_LUA on z.cmd, and add an explanatory comment

This commit is contained in:
Dean Matzkov 2019-02-02 17:36:16 -07:00
parent 0106ab4eb4
commit f11be5b84a
2 changed files with 3 additions and 1 deletions

View File

@ -4,7 +4,7 @@ $NetBSD$
To begin using z.lua, put something like the following in
either ~/.profile or ~/.bashrc:
if [ -e /usr/pkg/bin/z.lua ]; then
if [ -e ${PREFIX}/bin/z.lua ]; then
eval "$(lua ${PREFIX}/bin/z.lua --init posix)"
fi

View File

@ -13,6 +13,7 @@ COMMENT= Tool that lets you quickly jump around your filesystem
LICENSE= mit
NO_BUILD= yes
REPLACE_LUA+= z.lua
# Upstream has no releases, so we don't use ${DISTNAME} here.
WRKSRC= ${WRKDIR}/${GITHUB_PROJECT}-${GITHUB_TAG}
@ -29,6 +30,7 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/README.cn.md ${DESTDIR}${PREFIX}/share/doc/${PKGBASE}
# z.cmd is a Batch/.bat script for Windows users. Not terribly useful for Unix-ey users, so into share/ it goes.
# Note that we don't use ${INSTALL_SCRIPT} here since being +x'd wouldn't do anything on Windows.
${INSTALL_DATA} ${WRKSRC}/z.cmd ${DESTDIR}${PREFIX}/share/${PKGBASE}
.include "../../lang/lua/application.mk"