From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jan 5 11:20:30 2005 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 708D416A4CE for ; Wed, 5 Jan 2005 11:20:30 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 437FF43D2F for ; Wed, 5 Jan 2005 11:20:30 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j05BKU5u020957 for ; Wed, 5 Jan 2005 11:20:30 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j05BKU3x020956; Wed, 5 Jan 2005 11:20:30 GMT (envelope-from gnats) Date: Wed, 5 Jan 2005 11:20:30 GMT Message-Id: <200501051120.j05BKU3x020956@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Ion-Mihai Tetcu Subject: Re: ports/75826: New port: shells/friedcshrc a shell startup script for tcsh and csh X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Ion-Mihai Tetcu List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jan 2005 11:20:30 -0000 The following reply was made to PR ports/75826; it has been noted by GNATS. From: Ion-Mihai Tetcu To: Jason Fried Cc: FreeBSD-gnats-submit@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 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@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"