Install skeleton files based on the values of MK_MAIL and MK_TCSH

Customize according to MK_GAMES and MK_VI, in particular comment out lines
that would change behavior

Change dot.cshrc and dot.profile to not check for /usr/games/fortune based
on the new behavior in customizing the files
This commit is contained in:
Enji Cooper 2014-11-28 22:07:16 +00:00
parent 6dd1d788eb
commit 0a775c8d2e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/building-blocks/; revision=275219
5 changed files with 44 additions and 6 deletions

View File

@ -1,14 +1,52 @@
# @(#)Makefile 8.1 (Berkeley) 6/8/93
# $FreeBSD$
.include <src.opts.mk>
FILESGROUPS= FILES1 FILES2
FILES1= dot.cshrc dot.login dot.login_conf dot.mailrc dot.profile \
dot.shrc
FILES2= dot.mail_aliases dot.rhosts
FILES1= dot.login dot.login_conf dot.profile dot.shrc
FILES1DIR= /usr/share/skel
FILES2DIR= /usr/share/skel
FILES1MODE= 0644
FILES2MODE= 0600
NO_OBJ=
.PATH: ${.OBJDIR} ${.CURDIR}
.if ${MK_MAIL} != "no"
FILES1+= dot.mailrc
FILES2+= dot.mail_aliases
.endif
.if ${MK_RCMDS} != "no"
FILES2+= dot.rhosts
.endif
.if ${MK_TCSH} != "no"
FILES1+= dot.cshrc
.endif
.if ${MK_GAMES} == "no"
dot.login_SED+= -e "/\/usr\/games\/fortune /s/^/\#/"
dot.profile_SED+= -e "/\/usr\/games\/fortune /s/^/\#/"
.endif
.if ${MK_VI} == "no"
dot.cshrc_SED+= -e '/^setenv.*EDITOR.*vi$$/s/^/\#/'
dot.mailrc_SED+= -e '/^set EDITOR=vi$$/s/^/\#/' -e '/^set VISUAL=vi$$/s/^/\#/'
dot.profile_SED+= -e '/^EDITOR=vi; /s/^/\#/'
.endif
.for f in dot.cshrc dot.login dot.mailrc dot.profile
.if empty(${f}_SED)
$f: $f.in
cp ${.ALLSRC} ${.TARGET}
.else
$f: $f.in
sed ${${f}_SED} < ${.ALLSRC} > ${.TARGET}.tmp
mv ${.TARGET}.tmp ${.TARGET}
CLEANFILES+= $f.tmp
.endif
CLEANFILES+= $f
.endfor
.include <bsd.prog.mk>

View File

@ -5,4 +5,4 @@
# see also csh(1), environ(7).
#
if ( -x /usr/games/fortune ) /usr/games/fortune freebsd-tips
/usr/games/fortune freebsd-tips

View File

@ -21,4 +21,4 @@ PAGER=more; export PAGER
# set ENV to a file invoked each time sh is started for interactive use.
ENV=$HOME/.shrc; export ENV
if [ -x /usr/games/fortune ] ; then /usr/games/fortune freebsd-tips ; fi
/usr/games/fortune freebsd-tips