summaryrefslogtreecommitdiff
path: root/shells/tcsh/Makefile
diff options
context:
space:
mode:
authorabs <abs>2001-08-06 15:37:37 +0000
committerabs <abs>2001-08-06 15:37:37 +0000
commitcb246cdcaf61a317e66520124d7eca7ac7bd3ef1 (patch)
tree1613d02507f967d7166d9ee220f8a4b4863eb297 /shells/tcsh/Makefile
parent56b52649940e82db13f5a9c15edc8725bf06ee8b (diff)
downloadpkgsrc-cb246cdcaf61a317e66520124d7eca7ac7bd3ef1.tar.gz
Handle a PREFIX of / correctly when dealing with /etc/shells
Diffstat (limited to 'shells/tcsh/Makefile')
-rw-r--r--shells/tcsh/Makefile11
1 files changed, 8 insertions, 3 deletions
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"