1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-07 06:40:06 +00:00
freebsd-ports/java/jdk16/files/pkg-deinstall.in
Joe Marcus Clarke 29747f458a Chase the GNOME X11BASE to LOCALBASE move, and fix the build with the
new freetype2 where needed.

Submitted by:	mezz, ahze, pav, and many others
Approved by:	portmgr (implicit, kris)
2006-10-14 08:54:54 +00:00

32 lines
802 B
Bash

#!/bin/sh
# $FreeBSD$
# Set up a standard path
PATH=/usr/bin:/bin
# Don't do anything during post-deinstall
if [ "$2" = "POST-DEINSTALL" ]; then
exit 0
fi
# Remove the plugin
# Plugin location variables
BROWSERPLUGINDIR="%%LOCALBASE%%/lib/browser_plugins"
JAVAPLUGINDIR="%%JRE_HOME%%/plugin/%%ARCH%%/ns7"
PLUGIN=libjavaplugin_oji.so
# Check if the package includes the plugin
if [ ! -e "${JAVAPLUGINDIR}/${PLUGIN}" ]; then
exit 0
fi
# See if the browser plugin is a link to the package plugin and remove it if so.
if [ -e "${BROWSERPLUGINDIR}/${PLUGIN}" -a \
-L "${BROWSERPLUGINDIR}/${PLUGIN}" -a \
x`ls -l "${BROWSERPLUGINDIR}/${PLUGIN}" 2>/dev/null | awk '/->/{print $NF;exit 0}END{exit 1}'` = x"${JAVAPLUGINDIR}/${PLUGIN}" ]; then
rm -f "${BROWSERPLUGINDIR}/${PLUGIN}"
fi
exit 0