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:
parent
6dd1d788eb
commit
0a775c8d2e
@ -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>
|
||||
|
@ -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
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user