Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 May 2000 17:43:11 -0400
From:      Tim Vanderhoek <vanderh@ecf.utoronto.ca>
To:        Satoshi - Ports Wraith - Asami <asami@freebsd.org>
Cc:        ports@freebsd.org
Subject:   Re: ports projects
Message-ID:  <20000530174311.B83316@orange>
In-Reply-To: <200005301106.EAA47917@silvia.hip.berkeley.edu>; from Satoshi - Ports Wraith - Asami on Tue, May 30, 2000 at 04:06:35AM -0700
References:  <Pine.BSF.4.10.10005021057480.36418-100000@pawn.primelocation.net> <vqcvh0wacgg.fsf@silvia.hip.berkeley.edu> <200005071229.FAA29460@silvia.hip.berkeley.edu> <200005301106.EAA47917@silvia.hip.berkeley.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 30, 2000 at 04:06:35AM -0700, Satoshi - Ports Wraith - Asami wrote:
> 
> The only "biggie" left that I am aware of is tcl/tk with their
> tclsh/wish scripts.  We need to write a clever script that goes with
> INSTALL.{tcl,wi}sh that will remove them when there are no other
> {tcl,wi}sh* scripts found.

The existing tclsh script checks for other tclsh installations with:

name=$(/bin/ls $(echo $PATH | sed 's/:/ /g') 2> /dev/null | egrep '^tclsh[0-9]+\.[0-9]+([a-z][a-z])?$')

That is, it checks $PATH for anything matching that regexp.  If
``$PATH'' was changed to ``${PKG_PREFIX}/bin'', pkg/DEINSTALL could look
like:

#! /bin/sh
TCLSH=${PKG_PREFIX}/bin/tclsh
BINDIR="${PKG_PREFIX}/bin /usr/X11R6/bin"
tclshs=$(/bin/ls ${BINDIR} 2> /dev/null | \
    egrep '^tclsh[0-9]+\.[0-9]+([a-z][a-z])?$')
if [ "$tclshs" = "" -a -f ${TCLSH} -a ! -L ${TCLSH} ] && \
    (head -3 ${TCLSH} | grep awieYJFnsuILOnfsYEW) >/dev/null 2>&1
then
	rm -f ${TCLSH}
fi


Does that do what you want?  Or something else?


-- 
Signature withheld by request of author.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000530174311.B83316>