summaryrefslogtreecommitdiff
path: root/shells/tcsh
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2001-08-06 15:37:37 +0000
committerabs <abs@pkgsrc.org>2001-08-06 15:37:37 +0000
commit7638fafa9736df11a6ce6830348aa4e96ad01e6d (patch)
tree1613d02507f967d7166d9ee220f8a4b4863eb297 /shells/tcsh
parent8db818d96ca4b1c87ca50e101a5780b739d30843 (diff)
downloadpkgsrc-7638fafa9736df11a6ce6830348aa4e96ad01e6d.tar.gz
Handle a PREFIX of / correctly when dealing with /etc/shells
Diffstat (limited to 'shells/tcsh')
-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"