File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed
Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash -e
22#
3- # Copyright (c) 2018, 2021 , Oracle and/or its affiliates. All rights reserved.
3+ # Copyright (c) 2018, 2023 , Oracle and/or its affiliates. All rights reserved.
44# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55#
66# This code is free software; you can redistribute it and/or modify it
@@ -40,10 +40,22 @@ mkdir -p $BUILD_DIR $JAR_DIR
4040cd $JAR_DIR
4141rm -f *
4242
43- wget https://repo.maven.apache.org/maven2/org/apache/commons/commons-math3/$COMMONS_MATH3_VERSION /commons-math3-$COMMONS_MATH3_VERSION .jar
44- wget https://repo.maven.apache.org/maven2/net/sf/jopt-simple/jopt-simple/$JOPT_SIMPLE_VERSION /jopt-simple-$JOPT_SIMPLE_VERSION .jar
45- wget https://repo.maven.apache.org/maven2/org/openjdk/jmh/jmh-core/$JMH_VERSION /jmh-core-$JMH_VERSION .jar
46- wget https://repo.maven.apache.org/maven2/org/openjdk/jmh/jmh-generator-annprocess/$JMH_VERSION /jmh-generator-annprocess-$JMH_VERSION .jar
43+ fetchJar () {
44+ url=" https://repo.maven.apache.org/maven2/$1 /$2 /$3 /$2 -$3 .jar"
45+ if command -v curl > /dev/null; then
46+ curl -O --fail $url
47+ elif command -v wget > /dev/null; then
48+ wget $url
49+ else
50+ echo " Could not find either curl or wget"
51+ exit 1
52+ fi
53+ }
54+
55+ fetchJar org/apache/commons commons-math3 $COMMONS_MATH3_VERSION
56+ fetchJar net/sf/jopt-simple jopt-simple $JOPT_SIMPLE_VERSION
57+ fetchJar org/openjdk/jmh jmh-core $JMH_VERSION
58+ fetchJar org/openjdk/jmh jmh-generator-annprocess $JMH_VERSION
4759
4860tar -cvzf ../$BUNDLE_NAME *
4961
You can’t perform that action at this time.
0 commit comments