From b496a3f1af9877d792ce6df6b393afeed7ddb21f Mon Sep 17 00:00:00 2001 From: Serge Guzik Date: Wed, 20 Feb 2019 14:20:12 +0200 Subject: [PATCH] feat: Filter distributions and take normal heap size --- warp4j | 3 +++ 1 file changed, 3 insertions(+) diff --git a/warp4j b/warp4j index 09acb47..b404d55 100755 --- a/warp4j +++ b/warp4j @@ -475,8 +475,11 @@ function find_distro_link() { local info=$1 # info fetched from AdoptOpenJDK local version=$2 # concrete distro version like "11.0.2+9" local link=$(echo "$info" \ + | grep -B13 "\"heap_size\": \"normal\"" \ | grep -B11 "\"semver\": \"$version\"" \ | grep "binary_link" \ + | sort --reverse \ + | head -n 1 \ | awk '{print $2}' \ | sed -e 's/"//g' -e 's/,//') if [[ -z $link ]]; then