-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjre.install
49 lines (39 loc) · 1.39 KB
/
jre.install
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
46
47
48
49
this_java='java-6-oracle/jre'
post_install() {
echo "The Oracle jre package is licensed software."
echo "You MUST read and agree to the license stored in"
echo "/usr/share/licenses/jre6-oracle/LICENSE before using it."
xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
echo "when you use a non-reparenting window manager"
echo "set _JAVA_AWT_WM_NONREPARENTING=1 in"
echo "/etc/profile.d/jre.sh"
# update-desktop-database -q
default=$(/usr/bin/archlinux-java get)
if [ -z "${default}" ]; then
/usr/bin/archlinux-java set ${this_java}
elif [ "${default/\/jre}" = "${this_java/\/jre}" ]; then
/usr/bin/archlinux-java fix
else
echo "Default Java environment is already set to '${default}'"
echo "To set '${this_java}' as default, consider using:"
echo " archlinux-java set '${this_java}'"
fi
}
post_upgrade() {
xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
# update-desktop-database -q
default=$(/usr/bin/archlinux-java get)
if [ -z "${default}" ]; then
/usr/bin/archlinux-java set ${this_java}
elif [ "${default/\/jre}" = "${this_java/\/jre}" ]; then
/usr/bin/archlinux-java fix
fi
}
post_remove() {
xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
# update-desktop-database -q
default=$(/usr/bin/archlinux-java get)
if [ "${default/\/jre}" = "${this_java/\/jre}" ]; then
/usr/bin/archlinux-java fix
fi
}