1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-17 03:25:46 +00:00
freebsd-ports/java/diablo-jre13/pkg-deinstall
Greg Lewis 3fbdc31cad . Add a port of the Diablo Latte JRE 1.3.1 binary release.
"The Java Runtime Environment (JRE) implements the Java Virtual
   machine and base classes, and permits the execution of Java
   applications on FreeBSD."
2003-08-25 16:53:03 +00:00

36 lines
1.0 KiB
Bash

#!/bin/sh
# $FreeBSD: /tmp/pcvs/ports/java/diablo-jre13/Attic/pkg-deinstall,v 1.1 2003-08-25 16:53:03 glewis Exp $
# 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
MOZILLAPLUGINDIR=/usr/X11R6/lib/mozilla/plugins
if [ `echo "$1" | grep jdk` ]; then
DIABLOPLUGINDIR=${PKG_PREFIX}/diablo-jdk1.3.1/jre/plugin/i386/ns600
else
DIABLOPLUGINDIR=${PKG_PREFIX}/diablo-jre1.3.1/plugin/i386/ns600
fi
PLUGIN=libjavaplugin_oji.so
# Check if the package includes the plugin
if [ ! -e "${DIABLOPLUGINDIR}/${PLUGIN}" ]; then
exit 0
fi
# See if the browser plugin is a link to the package plugin and remove it if so.
if [ -e "${MOZILLAPLUGINDIR}/${PLUGIN}" -a \
-L "${MOZILLAPLUGINDIR}/${PLUGIN}" -a \
x`ls -l "${MOZILLAPLUGINDIR}/${PLUGIN}" 2>/dev/null | awk '/->/{print $NF;exit 0}END{exit 1}'` = x"${DIABLOPLUGINDIR}/${PLUGIN}" ]; then
rm -f "${MOZILLAPLUGINDIR}/${PLUGIN}"
fi
exit 0