aboutsummaryrefslogtreecommitdiff
path: root/java/diablo-jdk13/pkg-deinstall
diff options
context:
space:
mode:
Diffstat (limited to 'java/diablo-jdk13/pkg-deinstall')
-rw-r--r--java/diablo-jdk13/pkg-deinstall35
1 files changed, 35 insertions, 0 deletions
diff --git a/java/diablo-jdk13/pkg-deinstall b/java/diablo-jdk13/pkg-deinstall
new file mode 100644
index 000000000000..f66d200d5797
--- /dev/null
+++ b/java/diablo-jdk13/pkg-deinstall
@@ -0,0 +1,35 @@
+#!/bin/sh
+# $FreeBSD: /tmp/pcvs/ports/java/diablo-jdk13/Attic/pkg-deinstall,v 1.1 2003-08-25 16:54:36 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