summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorprofessorkaos642017-01-16 12:55:26 -0500
committerprofessorkaos642017-01-16 12:55:26 -0500
commitbc9cd0ccc6fd3eaca493746a1efc60e5132ddc18 (patch)
tree32877d0ab54d580b2ae5fb7030ae84e128a49282
parentbaf87908e428230298a99b2aa28c3e0707070173 (diff)
downloadaur-bc9cd0ccc6fd3eaca493746a1efc60e5132ddc18.tar.gz
fix up conditional per Det's suggestion
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD18
2 files changed, 11 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cb7ffbbddb5..f31bd9ecd3e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = playonlinux5-git
pkgdesc = GUI for managing Windows programs under linux (development version based on Java)
pkgver = r1491.09432248
- pkgrel = 3
+ pkgrel = 4
epoch = 2
url = http://www.playonlinux.com/
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index 5a78d992913..492197b696a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,5 @@
# Maintainer : Michael DeGuzis <mdeguzis@gmail.com>
+# Contributor: Det <aur.archlinux.org/account/Det>
# Contributor: Nick Shvelidze <captain@pirrate.me>
# Contributor: Justin Dray <justin@dray.be>
# Contributor: Laurent Carlier <lordheavym@gmail.com>
@@ -11,7 +12,7 @@
_pkgname=playonlinux5
pkgname=${_pkgname}-git
pkgver=r1491.09432248
-pkgrel=3
+pkgrel=4
epoch=2
pkgdesc="GUI for managing Windows programs under linux (development version based on Java)"
arch=('any')
@@ -46,15 +47,16 @@ build() {
# Set JAVA_HOME to include Java 8 for users not defaulted to Java 8 yet
if (( $(archlinux-java get | cut -d "-" -f2) < 8 )) || [[ ! -f /usr/bin/javac ]]; then
- # test for openjdk, fall back on oracle jdk if not present
+ # test for openjdk, fall back on other jdks if not found
# Take the highest sorted version of either (head -1) so that versions above 8 will be selected
- openjdk=$(ls /usr/lib/jvm/java-{8,9}-*/bin/javac 2>/dev/null | cut -d "/" -f-5 | awk '/-openjdk/' | head -1)
- oraclejdk=$(ls /usr/lib/jvm/java-{8,9}-*/bin/javac 2>/dev/null | cut -d "/" -f-5 | awk '/-jdk/' | head -1)
+ _openjdk=$(ls /usr/lib/jvm/java-{8,9}-openjdk/bin/javac 2>/dev/null | cut -d "/" -f-5)
- if [[ "${openjdk}" ]]; then
- export JAVA_HOME="${openjdk}"
- elif [[ "${oraclejdk}" ]]; then
- export JAVA_HOME="${oraclejdk}"
+ if [[ "${_openjdk}" ]]; then
+ # choose the first one available
+ export JAVA_HOME="${_openjdk[0]}"
+ else
+ # fall back to other JDKs
+ export JAVA_HOME=$(ls /usr/lib/jvm/java-{8,9}-*/bin/javac 2>/dev/null | cut -d "/" -f-5 | head -1)
fi
fi