summaryrefslogtreecommitdiff
path: root/shells/tcsh/Makefile
diff options
context:
space:
mode:
authortron <tron>2001-09-23 21:01:29 +0000
committertron <tron>2001-09-23 21:01:29 +0000
commitd62af28b74783148b21a8c18b182fbde0dbe3a90 (patch)
treeb29b85408effe8dd04117842014bb17fb45b00b8 /shells/tcsh/Makefile
parentfb9ecd7105413c9138b15f205c46b30df1916e22 (diff)
downloadpkgsrc-d62af28b74783148b21a8c18b182fbde0dbe3a90.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/tcsh/Makefile')
-rw-r--r--shells/tcsh/Makefile6
1 files changed, 4 insertions, 2 deletions
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