blob: 7a71ffb3e4bb0376b8d03cf5093466fb5ecbf751 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#!/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 shared archives
if [ `echo "$1" | grep jdk` ]; then
SHAREDARCHIVEDIR=${PKG_PREFIX}/diablo-jdk%%JDK_VERSION%%/jre/lib/%%ARCH%%
else
SHAREDARCHIVEDIR=${PKG_PREFIX}/diablo-jre%%JRE_VERSION%%/lib/%%ARCH%%
fi
for _vm in client server; do
rm -f "${SHAREDARCHIVEDIR}/${_vm}/classes.jsa" > /dev/null 2>&1
done
# Remove the plugin
# Plugin location variables
BROWSERPLUGINDIR=%%LOCALBASE%%/lib/browser_plugins
if [ `echo "$1" | grep jdk` ]; then
DIABLOPLUGINDIR=${PKG_PREFIX}/diablo-jdk%%JDK_VERSION%%/jre/plugin/`uname -p`/ns7
else
DIABLOPLUGINDIR=${PKG_PREFIX}/diablo-jre%%JRE_VERSION%%/plugin/`uname -p`/ns7
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 "${BROWSERPLUGINDIR}/${PLUGIN}" -a \
-L "${BROWSERPLUGINDIR}/${PLUGIN}" -a \
x`ls -l "${BROWSERPLUGINDIR}/${PLUGIN}" 2>/dev/null | awk '/->/{print $NF;exit 0}END{exit 1}'` = x"${DIABLOPLUGINDIR}/${PLUGIN}" ]; then
rm -f "${BROWSERPLUGINDIR}/${PLUGIN}"
fi
exit 0
|