OCaml 4.14.0 rebuild
[arch-packages.git] / java8-openjdk / trunk / install_jdk8-openjdk.sh
blobfaac872502a03bc1c4b2b175782336666db75796
1 THIS_JDK='java-8-openjdk'
3 fix_default() {
4 if [ ! -x /usr/bin/java ]; then
5 /usr/bin/archlinux-java unset
6 echo ""
7 else
8 /usr/bin/archlinux-java get
9 fi
12 post_install() {
13 default=$(fix_default)
14 case ${default} in
15 "" | ${THIS_JDK}/jre)
16 /usr/bin/archlinux-java set ${THIS_JDK}
18 ${THIS_JDK})
19 # Nothing
22 echo "Default Java environment is already set to '${default}'"
23 echo "See 'archlinux-java help' to change it"
25 esac
27 if [ ! -f /etc/ssl/certs/java/cacerts ]; then
28 /usr/bin/update-ca-trust
32 post_upgrade() {
33 default=$(fix_default)
34 if [ -z "${default}" -o "x${default}" = "x${THIS_JDK}/jre" ]; then
35 /usr/bin/archlinux-java set ${THIS_JDK}
38 if [ ! -f /etc/ssl/certs/java/cacerts ]; then
39 /usr/bin/update-ca-trust
43 pre_remove() {
44 if [ "x$(fix_default)" = "x${THIS_JDK}" ]; then
45 /usr/bin/archlinux-java unset
46 if [ -x /usr/lib/jvm/${THIS_JDK}/jre/bin/java ]; then
47 /usr/bin/archlinux-java set ${THIS_JDK}/jre