ports/75826: New port: shells/friedcshrc a shell startup script for tcsh and csh

Ion-Mihai Tetcu itetcu at people.tecnik93.com
Wed Jan 5 11:20:30 UTC 2005


The following reply was made to PR ports/75826; it has been noted by GNATS.

From: Ion-Mihai Tetcu <itetcu at people.tecnik93.com>
To: Jason Fried <jfried at cs.selu.edu>
Cc: FreeBSD-gnats-submit at FreeBSD.org
Subject: Re: ports/75826: New port: shells/friedcshrc a shell startup script
 for	tcsh and csh
Date: Wed, 5 Jan 2005 12:39:54 +0200

 On Tue, 4 Jan 2005 17:19:19 -0600 (CST)
 Jason Fried <jfried at cs.selu.edu> wrote:
 
 > 
 > >Number:         75826
 > >Category:       ports
 > >Synopsis:       New port: shells/friedcshrc a shell startup script for tcsh and csh
  [ ... ]
 > >Description:
 > 	
 > 	This is a shell startup script for use with tcsh and csh, it has some good
 > 	features. It is used by over 200 people here at SELU. Its along the 
 > 	same lines as the shells/tcshrc port, but taken a userfriendly style.
 > 	It was developed for use with FreeBSD, but is not exclusive to FreeBSD. 
 
 Thanks for your work, from the description it seems very useful.
 
 > echo x - friedcshrc/Makefile
 > sed 's/^X//' >friedcshrc/Makefile << 'END-of-friedcshrc/Makefile'
 > X# New ports collection makefile for:   friedcshrc
 > X# Date created:        04 January 2005
 > X# Whom:                jfried
 > X#
 > X# $FreeBSD$
 > X#
 > X
 > XPORTNAME=      friedcshrc
 > XPORTVERSION=   1.0b
 > XCATEGORIES=    shells
 > XMASTER_SITES=  http://cs.selu.edu/~jfried/
 > XDISTFILES=     cshrc.tar.gz dot.cshrc.tar.gz
 > X
 > XMAINTAINER=    jfried at cs.selu.edu
 > XCOMMENT=       Custom Startup Script for the Tcsh and Csh shells
 > X
 > XIGNOREFILES=   cshrc.tar.gz dot.cshrc.tar.gz
 
 Why ?  If you want the files refetched on every make (e.g. you change
 them a lot) this wouldn't help - you need to overload do-fetch. Perhaps
 it is a better idea to  bump PORTVERSION or PORTREVISION when you change
 something so the user know the port has been updated ?
 
 > XNO_BUILD=      YES
 > X
 > Xpre-fetch:
 > X	@${ECHO_MSG} "Fetching the Current Version of Fried Script"
 
 This would be redundant, if the distfiles aren't already on the local system
 they will be fetched with the appropriate message; if they are the
 message is wrong.
 
 > X
 > Xdo-install:
 > X	${CP} -f ${WRKDIR}/dot.cshrc ${PREFIX}/share/skel/
  
 The file will be overwritten on the next cvsup so it would be a 
 good idea to warn the user about it. Or install it in /etc (which is somehow a 
 bad idea since ports should generally obey PREFIX) backing up the existing file.
 Or in ${EXAMPLESDIR}/${PORTNAME} ?
 
 > X	${RM} -f ${HOME}/.tcshrc
 > X	${RM} -f ${HOME}/.cshrc
 > X	${CP} -f ${WRKDIR}/.cshrc ${HOME}/.cshrc
  [ ... ]
 
  DON'T. NEVER EVER remove something your port hasn't installed.
 You'll be cursed but anyone who uses your port. While I would probably
 use your port, there are a few things in my .*csh* files that can not be
 in yours and searching backups is a sport I tend to avoid ;)
 
  If you really feel you need this either provide an option and warn the
 user or better include his customized files (from what you echo bellow:
  if [ -e ${HOME}/.tcshrc.local ]
 	@${ECHO_CMD} "Back-up-ing your .tcshrc.local"
  	${CP} ${HOME}/.tcshrc.local ${HOME}/.tcshrc.local.bak
  else
 	@${ECHO_CMD} "An existing .tcshrc.local was detected ..."
 	@${FALSE}
  fi
  @${ECHO_CMD} "Backup-ing your .tcshrc"
  ${CP} ${HOME}/.tcshrc ${HOME}/.tcshrc.local	
  if [ -e ${HOME}/.cshrc.local ]
 	@${ECHO_CMD} "Backup-ing your .cshrc.local"
  	${CP} ${HOME}/.cshrc.local ${HOME}/.cshrc.local.bak
  else
 	@${ECHO_CMD} "An existing .cshrc.local was detected ..."
 	@${FALSE}
  fi
  @${ECHO_CMD} "Back-up-ing your .tcshrc"
  ${CP} ${HOME}/.cshrc ${HOME}/.cshrc.local
  @${CP} ${WRKDIR}/.cshrc ${HOME}/.cshrc
 
 or something like this. However, what will happen if someone does a make
 deinstall reinstall or use portupgrade? 
 )
 
 An other idea would be to detect if the port is being run as root or
 not, since run as user will fail when trying to write in
 ${PREFIX}/share/skel/ if PREFIX=/usr/local
 
 
 -- 
 IOnut
 Unregistered ;) FreeBSD "user"
 
 



More information about the freebsd-ports-bugs mailing list