From 7638fafa9736df11a6ce6830348aa4e96ad01e6d Mon Sep 17 00:00:00 2001 From: abs Date: Mon, 6 Aug 2001 15:37:37 +0000 Subject: Handle a PREFIX of / correctly when dealing with /etc/shells --- shells/tcsh/Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'shells/tcsh/Makefile') diff --git a/shells/tcsh/Makefile b/shells/tcsh/Makefile index 214a61a5bec..019152e941b 100644 --- a/shells/tcsh/Makefile +++ b/shells/tcsh/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.24 2001/07/27 19:43:41 agc Exp $ +# $NetBSD: Makefile,v 1.25 2001/08/06 15:37:37 abs Exp $ # DISTNAME= tcsh-6.10 @@ -72,9 +72,14 @@ post-install: done @${ECHO} "updating /etc/shells"; \ ${CP} /etc/shells /etc/shells.bak; \ + if [ "${PREFIX}" = / ];then \ + TCSHPATH=/bin/tcsh; \ + else \ + TCSHPATH=${PREFIX}/bin/tcsh; \ + fi; \ ( \ - ${GREP} -v ${PREFIX}/bin/tcsh /etc/shells.bak; \ - ${ECHO} ${PREFIX}/bin/tcsh \ + ${GREP} -v $${TCSHPATH} /etc/shells.bak; \ + ${ECHO} $${TCSHPATH} \ ) >/etc/shells .include "../../mk/bsd.pkg.mk" -- cgit v1.2.3