index : packages | |
Archlinux32 package modifications | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2021-05-15 16:29:12 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2021-05-15 16:29:12 +0200 |
commit | 85abd230165823f70b8101ec3f40a536c1c90cb8 (patch) | |
tree | 2f70f84d776db65bbd215af42fca49790531e915 /build-support/disabled/java/java8-openjdk/install_jdk8-openjdk.sh | |
parent | 905049e8f500160ec0047ff838fbe69c4d57428d (diff) |
-rw-r--r-- | build-support/disabled/java/java8-openjdk/install_jdk8-openjdk.sh | 50 |
diff --git a/build-support/disabled/java/java8-openjdk/install_jdk8-openjdk.sh b/build-support/disabled/java/java8-openjdk/install_jdk8-openjdk.sh new file mode 100644 index 00000000..faac8725 --- /dev/null +++ b/build-support/disabled/java/java8-openjdk/install_jdk8-openjdk.sh @@ -0,0 +1,50 @@ +THIS_JDK='java-8-openjdk' + +fix_default() { + if [ ! -x /usr/bin/java ]; then + /usr/bin/archlinux-java unset + echo "" + else + /usr/bin/archlinux-java get + fi +} + +post_install() { + default=$(fix_default) + case ${default} in + "" | ${THIS_JDK}/jre) + /usr/bin/archlinux-java set ${THIS_JDK} + ;; + ${THIS_JDK}) + # Nothing + ;; + *) + echo "Default Java environment is already set to '${default}'" + echo "See 'archlinux-java help' to change it" + ;; + esac + + if [ ! -f /etc/ssl/certs/java/cacerts ]; then + /usr/bin/update-ca-trust + fi +} + +post_upgrade() { + default=$(fix_default) + if [ -z "${default}" -o "x${default}" = "x${THIS_JDK}/jre" ]; then + /usr/bin/archlinux-java set ${THIS_JDK} + fi + + if [ ! -f /etc/ssl/certs/java/cacerts ]; then + /usr/bin/update-ca-trust + fi +} + +pre_remove() { + if [ "x$(fix_default)" = "x${THIS_JDK}" ]; then + /usr/bin/archlinux-java unset + if [ -x /usr/lib/jvm/${THIS_JDK}/jre/bin/java ]; then + /usr/bin/archlinux-java set ${THIS_JDK}/jre + fi + fi +} |