diff options
author | Monika Schrenk | 2016-02-17 01:34:40 +0100 |
---|---|---|
committer | Monika Schrenk | 2016-02-17 01:34:40 +0100 |
commit | 9ebd9582ded75af889ba074e1f0947d7d6914440 (patch) | |
tree | 8e0faf105604f61f8af8d5d11b36a9718e2e3323 | |
parent | 1765c0953616ac3b34a7151f13f48144407ccdfe (diff) | |
download | aur-9ebd9582ded75af889ba074e1f0947d7d6914440.tar.gz |
Added some code to automagically pick one of the installed java 8 versions to start mongochef, if java 8 is not set as default on the system.
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | mongochef | 18 |
3 files changed, 22 insertions, 6 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Tue Feb 16 22:59:17 UTC 2016 +# Wed Feb 17 00:26:21 UTC 2016 pkgbase = mongochef pkgdesc = A free universal database tool for developers and database administrators pkgver = 3.4.0 - pkgrel = 1 + pkgrel = 2 url = http://3t.io/mongochef/ arch = i686 arch = x86_64 @@ -14,7 +14,7 @@ pkgbase = mongochef source = mongochef.desktop source = mongochef sha256sums = a603fd54a34f8aa59a70580fd4321db24f439ceb746545f1cf6c0216f7f8169e - sha256sums = 596d658ef927f74d041d514a32cb7380ffccc0309a74c297ad4827fa2b3ddbf1 + sha256sums = 3ef9e38cfd7ab9e0f6e70cebd635f96a7bbaccf255de2c6ed4f7fd5a4aab3728 source_i686 = https://cdn.3t.io/mongochef/linux/3.4.0/mongochef-linux-x86-dist.tar.gz sha256sums_i686 = af7d29eeab7ad57f429ed9e1fccb0efd92ebd56b04c349756900141c31a514b7 source_x86_64 = https://cdn.3t.io/mongochef/linux/3.4.0/mongochef-linux-x64-dist.tar.gz @@ -2,7 +2,7 @@ pkgname=mongochef pkgver=3.4.0 -pkgrel=1 +pkgrel=2 pkgdesc="A free universal database tool for developers and database administrators" arch=('i686' 'x86_64') url="http://3t.io/mongochef/" @@ -16,7 +16,7 @@ source_i686=("https://cdn.3t.io/mongochef/linux/${pkgver}/mongochef-linux-x86-di source_x86_64=("https://cdn.3t.io/mongochef/linux/${pkgver}/mongochef-linux-x64-dist.tar.gz") sha256sums=('a603fd54a34f8aa59a70580fd4321db24f439ceb746545f1cf6c0216f7f8169e' -'596d658ef927f74d041d514a32cb7380ffccc0309a74c297ad4827fa2b3ddbf1') +'3ef9e38cfd7ab9e0f6e70cebd635f96a7bbaccf255de2c6ed4f7fd5a4aab3728') sha256sums_i686=('af7d29eeab7ad57f429ed9e1fccb0efd92ebd56b04c349756900141c31a514b7') sha256sums_x86_64=('246f5d72e4d23eb610564ea07b7faadb6f4dd44827e22e03428049f50248dc82') diff --git a/mongochef b/mongochef index 1de8ac830571..7a6d60f3ec29 100644 --- a/mongochef +++ b/mongochef @@ -1,5 +1,21 @@ #!/bin/bash +## Get path to a JDK >= 8. If default JDK does not match, choose the first ## +## match from "archlinux-java status" list ## +java_default_version=`archlinux-java get | sed 's/[^0-9]//g'` +if [ "$java_default_version" -ge 8 ] +then + JDK_PATH="java" + ## echo "Using default JDK / JRE: "`archlinux-java get` +else + java_versions=`archlinux-java status | grep -oe java-[8-9]*-[a-z]*` + JDK_PATH="/usr/lib/jvm/"`echo $java_versions | cut -f 1 -d " " | sed 's_/jre__g'`"/jre/bin/java" + echo "Default java version is smaller than 8." + echo "Consider changing the default java version to 8 with archlinux-java." + echo "Using JDK / JRE 8 at "$JDK_PATH" for mongochef execution." +fi + + # Decide whether to use GTK2 or GTK3 based # on KDE being used or not # PURPOSE: Avoid crash due to bug in oxygen-gtk theme engine @@ -35,5 +51,5 @@ if [ "$useGtk2" = "yes" ]; then fi # Launch the java program -java -jar /opt/mongochef/data-man-mongodb-pro-*.jar +$JDK_PATH -jar /opt/mongochef/data-man-mongodb-pro-*.jar |