From f11be5b84a433f603622236b288e59cb26ada9c5 Mon Sep 17 00:00:00 2001 From: Dean Matzkov Date: Sat, 2 Feb 2019 17:36:16 -0700 Subject: [PATCH] zlua: use REPLACE_LUA on z.cmd, and add an explanatory comment --- zlua/MESSAGE | 2 +- zlua/Makefile | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/zlua/MESSAGE b/zlua/MESSAGE index ab27805aaa..82cd171ab8 100644 --- a/zlua/MESSAGE +++ b/zlua/MESSAGE @@ -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 diff --git a/zlua/Makefile b/zlua/Makefile index 7738430454..0474ecb9f7 100644 --- a/zlua/Makefile +++ b/zlua/Makefile @@ -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"