summaryrefslogtreecommitdiff
path: root/shells
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2001-09-23 21:01:29 +0000
committertron <tron@pkgsrc.org>2001-09-23 21:01:29 +0000
commit0aa1f59f15041259691dd8dcf1c707223a33a062 (patch)
treeb29b85408effe8dd04117842014bb17fb45b00b8 /shells
parent9a3915e30211d1a47bfd270a2dd90d56d6467665 (diff)
downloadpkgsrc-0aa1f59f15041259691dd8dcf1c707223a33a062.tar.gz
Make modifications of "/etc/shells" robust so that they don't fail if
"/etc/shells" doesn't exist or is empty after removing entries for cerntain shell. These problems show up e.g. under SunOS.
Diffstat (limited to 'shells')
-rw-r--r--shells/bash2/Makefile5
-rw-r--r--shells/tcsh/Makefile6
-rw-r--r--shells/zsh/Makefile5
-rw-r--r--shells/zsh3/Makefile5
4 files changed, 13 insertions, 8 deletions
diff --git a/shells/bash2/Makefile b/shells/bash2/Makefile
index 568b1062835..350150c61ff 100644
--- a/shells/bash2/Makefile
+++ b/shells/bash2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.29 2001/08/30 13:56:27 mrg Exp $
+# $NetBSD: Makefile,v 1.30 2001/09/23 21:01:29 tron Exp $
#
V= 2.05
@@ -39,8 +39,9 @@ post-patch:
done
post-install:
+ ${TOUCH} /etc/shells
${CP} /etc/shells /etc/shells.bak
- (${GREP} -v ${PREFIX}/bin/bash /etc/shells.bak; ${ECHO} ${PREFIX}/bin/bash) >/etc/shells
+ (${GREP} -v ${PREFIX}/bin/bash /etc/shells.bak || ${TRUE}; ${ECHO} ${PREFIX}/bin/bash) >/etc/shells
${RM} /etc/shells.bak
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/bash
${INSTALL_MAN} \
diff --git a/shells/tcsh/Makefile b/shells/tcsh/Makefile
index 702abc94d86..b432598f56e 100644
--- a/shells/tcsh/Makefile
+++ b/shells/tcsh/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.30 2001/09/06 00:54:52 kim Exp $
+# $NetBSD: Makefile,v 1.31 2001/09/23 21:01:30 tron Exp $
#
DISTNAME= tcsh-6.11
@@ -70,6 +70,7 @@ post-install:
done; \
done
@${ECHO} "updating /etc/shells"; \
+ ${TOUCH} /etc/shells; \
${CP} /etc/shells /etc/shells.bak; \
if [ "${PREFIX}" = / ];then \
TCSHPATH=/bin/tcsh; \
@@ -77,7 +78,8 @@ post-install:
TCSHPATH=${PREFIX}/bin/tcsh; \
fi; \
( \
- ${GREP} -v '^$${TCSHPATH}$$' /etc/shells.bak; \
+ ${GREP} -v '^$${TCSHPATH}$$' /etc/shells.bak || \
+ ${TRUE}; \
${ECHO} $${TCSHPATH} \
) >/etc/shells
diff --git a/shells/zsh/Makefile b/shells/zsh/Makefile
index 69881070434..4a157372949 100644
--- a/shells/zsh/Makefile
+++ b/shells/zsh/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.23 2001/07/23 18:23:44 nra Exp $
+# $NetBSD: Makefile,v 1.24 2001/09/23 21:01:30 tron Exp $
DISTNAME= zsh-4.0.2
CATEGORIES= shells
@@ -32,8 +32,9 @@ post-install:
@${INSTALL_DATA_DIR} ${PREFIX}/share/doc/zsh
@cd ${WRKSRC}/Etc; ${INSTALL_DATA} BUGS FAQ FEATURES NEWS \
${PREFIX}/share/doc/zsh
+ ${TOUCH} /etc/shells
${CP} /etc/shells /etc/shells.bak
- (${GREP} -v ${PREFIX}/bin/zsh /etc/shells.bak; ${ECHO} ${PREFIX}/bin/zsh) >/etc/shells
+ (${GREP} -v ${PREFIX}/bin/zsh /etc/shells.bak || ${TRUE}; ${ECHO} ${PREFIX}/bin/zsh) >/etc/shells
${RM} /etc/shells.bak
.include "../../mk/bsd.pkg.mk"
diff --git a/shells/zsh3/Makefile b/shells/zsh3/Makefile
index 037bafdb061..5f568958991 100644
--- a/shells/zsh3/Makefile
+++ b/shells/zsh3/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1.1.1 2001/06/05 16:30:14 jtb Exp $
+# $NetBSD: Makefile,v 1.2 2001/09/23 21:01:30 tron Exp $
DISTNAME= zsh-3.0.8
CATEGORIES= shells
@@ -22,8 +22,9 @@ LDFLAGS+= -static
.endif
post-install:
+ ${TOUCH} /etc/shells
${CP} /etc/shells /etc/shells.bak
- (${GREP} -v ${PREFIX}/bin/zsh /etc/shells.bak; ${ECHO} ${PREFIX}/bin/zsh) >/etc/shells
+ (${GREP} -v ${PREFIX}/bin/zsh /etc/shells.bak || ${TRUE}; ${ECHO} ${PREFIX}/bin/zsh) >/etc/shells
${RM} /etc/shells.bak
.include "../../mk/bsd.pkg.mk"