summaryrefslogtreecommitdiff
path: root/x11-toolkits/tk82/pkg-deinstall.wish
blob: 20ca9e8436c446bdac896b505d8a9dd8c94b18c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/sh
#
# Remove the ${PREFIX}/bin/wish script that gets installed by INSTALL.wish
# if we are the last wish installation to be pkg_delete'd.
#
# $FreeBSD$
#

#
# Explicitly listing /usr/X11R6/bin here is debatable.
#
BINDIR="${PKG_PREFIX}/bin /usr/X11R6/bin"
WISH=${PKG_PREFIX}/bin/wish

wishes=$(/bin/ls ${BINDIR} 2> /dev/null | \
    egrep '^o?wish(step)?(x|([0-9]+\.[0-9]+))([a-z][a-z])?$')

if [ "$wishes" = "" -a -f ${WISH} ] && \
    (head -3 ${WISH} | grep awieYJFnsuILOnfsYEW) > /dev/null 2>&1
then
	rm -f ${PKG_PREFIX}/bin/wish
fi