1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-05 01:55:52 +00:00
freebsd-ports/lang/tcl85/pkg-deinstall.tclsh
Cheng-Lung Sung 9e890b7d7d Add tcl85 8.5.a.5, tool Command Language (development version).
PR:		ports/108041
Submitted by:	martin at matuska.org
2007-01-29 03:06:56 +00:00

23 lines
557 B
Bash

#! /bin/sh
#
# Remove the ${PREFIX}/bin/tclsh script that gets installed by INSTALL.tclsh
# if we are the last tclsh installation to be pkg_delete'd.
#
# $FreeBSD$
#
#
# Explicitly listing /usr/X11R6/bin here is debatable.
#
BINDIR="${PKG_PREFIX}/bin ${X11BASE}/bin"
TCLSH=${PKG_PREFIX}/bin/tclsh
tclshs=$(/bin/ls ${BINDIR} 2> /dev/null | \
egrep '^(i?tclsh[0-9]+\.[0-9]+(\_r)?([a-z][a-z])?)|otclsh$')
if [ "$tclshs" = "" -a -f ${TCLSH} ] && \
(head -3 ${TCLSH} | grep awieYJFnsuILOnfsYEW) > /dev/null 2>&1
then
rm -f ${PKG_PREFIX}/bin/tclsh
fi