Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --openssl-repo option for downloading OpenSSL source #37

Merged
merged 1 commit into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions closed/get_openssl_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@
# ===========================================================================

usage() {
echo "Usage: $0 [-h|--help] [--openssl-version=<openssl version 1.0.2 and above to download>]"
echo "Usage: $0 [-h|--help] [--openssl-repo=<repo URL>] [--openssl-version=<openssl version 1.0.2 and above to download>]"
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
Expand All @@ -41,6 +42,10 @@ do
usage
;;

--openssl-repo=* )
OPENSSL_URL="${i#*=}"
;;

--openssl-version=* )
OPENSSL_VERSION="${i#*=}"
;;
Expand Down Expand Up @@ -85,8 +90,8 @@ 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

7 changes: 6 additions & 1 deletion get_source.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# ===========================================================================
# (c) Copyright IBM Corp. 2017, 2021 All Rights Reserved
# (c) Copyright IBM Corp. 2017, 2022 All Rights Reserved
# ===========================================================================
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -41,6 +41,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
Expand All @@ -60,6 +61,10 @@ for i in "$@" ; do
j9options="${j9options} ${i}"
;;

--openssl-repo=* )
openssloptions="${openssloptions} ${i}"
;;

--openssl-version=* )
DOWNLOAD_OPENSSL=true
openssloptions="${openssloptions} ${i}"
Expand Down