File: remove

package info (click to toggle)
java-package 0.24
  • links: PTS
  • area: contrib
  • in suites: sarge
  • size: 224 kB
  • ctags: 42
  • sloc: sh: 1,149; makefile: 71
file content (39 lines) | stat: -rw-r--r-- 952 bytes parent folder | download
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
suffix=j2re1.4-ibm
j2se_base="/usr/lib/$suffix"

if [ ! -e "$j2se_base/debian/info" ]; then
    exit 0
fi

# alternative <program>
function program_alternative() {
    local program="$1"
    update-alternatives \
        --remove "$program" "/usr/bin/$program-$suffix"
    rm "/usr/bin/$program-$suffix"
}

program_alternative java
program_alternative javaw
program_alternative rmid
program_alternative rmiregistry

# the plugin is only available for i386 architecture
if [ $(dpkg --print-architecture) = i386 ] ; then

    # assemble the plugin path
    plugin_dir="$j2se_base/jre/bin"

    # netscape
    update-alternatives \
        --remove "netscape-javaplugin.so" "$plugin_dir/libjavaplugin_oji.so"

    # mozilla
    update-alternatives \
        --remove "mozilla-javaplugin.so" "$plugin_dir/libjavaplugin_ojigcc3.so"

    # firefox
    update-alternatives \
        --remove "firefox-javaplugin.so" "$plugin_dir/libjavaplugin_ojigcc3.so"

fi