summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJulian Raufelder2021-10-13 23:08:35 +0200
committerJulian Raufelder2021-10-13 23:56:43 +0200
commita1bd22a2f31277cbee6354df41990dc6fac77df8 (patch)
tree29d6a5c64c08592900202390d4e26c1262afa0c6 /PKGBUILD
parent5737c4588f48dd1fbe62129f6ed94ac6196067c7 (diff)
downloadaur-a1bd22a2f31277cbee6354df41990dc6fac77df8.tar.gz
Add prepare() step where we check now that the correct JDK is selected
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD10
1 files changed, 10 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 4509b63a6fae..b615e6f4c503 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -29,6 +29,16 @@ options=('!strip')
validpgpkeys=('58117AFA1F85B3EEC154677D615D449FE6E6A235')
+prepare() {
+ if ! archlinux-java status | grep default | grep 17 ; then
+ echo "You don't have a Java 17 JDK selected but the following installed on your system:"
+ echo "`archlinux-java status | grep 17`"
+ echo "Select a Java 17 JDK using \"sudo archlinux-java set [name from the list above]\""
+ echo "If you switched to a JDK 17, please re-run the installation."
+ return 1
+ fi
+}
+
build() {
cd "${srcdir}/cryptomator-${pkgver}"
mvn -B clean package -DskipTests -Plinux