diff --git a/closed/get_openssl_source.sh b/closed/get_openssl_source.sh index 73783208ea8..79b7256e24c 100755 --- a/closed/get_openssl_source.sh +++ b/closed/get_openssl_source.sh @@ -23,16 +23,17 @@ # =========================================================================== usage() { - echo "Usage: $0 [-h|--help] [--openssl-version=]" + echo "Usage: $0 [-h|--help] [--openssl-repo=] [--openssl-version=]" echo "where:" echo " -h|--help print this help, then exit" + echo " --openssl-repo OpenSSL repository. By default, https://github.com/openssl/openssl.git" echo " --openssl-version OpenSSL version to download. For example, 1.1.1" echo "" exit 1 } OPENSSL_VERSION="" -GIT_URL="https://github.com/openssl/openssl.git" +OPENSSL_URL="https://github.com/openssl/openssl.git" for i in "$@" do @@ -41,6 +42,10 @@ do usage ;; + --openssl-repo=* ) + OPENSSL_URL="${i#*=}" + ;; + --openssl-version=* ) OPENSSL_VERSION="${i#*=}" ;; @@ -85,7 +90,7 @@ if [ -f "openssl/openssl_version.txt" ]; then fi echo "" -echo "Cloning OpenSSL version $OPENSSL_VERSION" -git clone --depth=1 -b $OPENSSL_SOURCE_TAG $GIT_URL +echo "Cloning OpenSSL version $OPENSSL_VERSION from $OPENSSL_URL" +git clone --depth=1 -b $OPENSSL_SOURCE_TAG $OPENSSL_URL echo $OPENSSL_SOURCE_TAG > openssl/openssl_version.txt diff --git a/get_source.sh b/get_source.sh index c47377887db..4101b3c00ae 100755 --- a/get_source.sh +++ b/get_source.sh @@ -25,7 +25,7 @@ # # =========================================================================== -# (c) Copyright IBM Corp. 2017, 2021 All Rights Reserved +# (c) Copyright IBM Corp. 2017, 2022 All Rights Reserved # =========================================================================== # exit immediately if any unexpected error occurs @@ -47,6 +47,7 @@ usage() { echo " -omr-sha a commit SHA for the omr repository" echo " -omr-reference a local repo to use as a clone reference" echo " -parallel (boolean) if 'true' then the clone j9 repository commands run in parallel, default is false" + echo " --openssl-repo Specify the OpenSSL repository to download from" echo " --openssl-version Specify the version of OpenSSL source to download" echo "" exit 1 @@ -66,6 +67,10 @@ for i in "$@" ; do j9options="${j9options} ${i}" ;; + --openssl-repo=* ) + openssloptions="${openssloptions} ${i}" + ;; + --openssl-version=* ) DOWNLOAD_OPENSSL=true openssloptions="${openssloptions} ${i}"