Skip to content

Commit 43dee90

Browse files
authored
Merge pull request #152 from pshipton/opensslrepo0.35
Add --openssl-repo option for downloading OpenSSL source
2 parents 5277bf8 + 3927bed commit 43dee90

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

closed/get_openssl_source.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@
2323
# ===========================================================================
2424

2525
usage() {
26-
echo "Usage: $0 [-h|--help] [--openssl-version=<openssl version 1.0.2 and above to download>]"
26+
echo "Usage: $0 [-h|--help] [--openssl-repo=<repo URL>] [--openssl-version=<openssl version 1.0.2 and above to download>]"
2727
echo "where:"
2828
echo " -h|--help print this help, then exit"
29+
echo " --openssl-repo OpenSSL repository. By default, https://github.com/openssl/openssl.git"
2930
echo " --openssl-version OpenSSL version to download. For example, 1.1.1"
3031
echo ""
3132
exit 1
3233
}
3334

3435
OPENSSL_VERSION=""
35-
GIT_URL="https://github.com/openssl/openssl.git"
36+
OPENSSL_URL="https://github.com/openssl/openssl.git"
3637

3738
for i in "$@"
3839
do
@@ -41,6 +42,10 @@ do
4142
usage
4243
;;
4344

45+
--openssl-repo=* )
46+
OPENSSL_URL="${i#*=}"
47+
;;
48+
4449
--openssl-version=* )
4550
OPENSSL_VERSION="${i#*=}"
4651
;;
@@ -85,7 +90,7 @@ if [ -f "openssl/openssl_version.txt" ]; then
8590
fi
8691

8792
echo ""
88-
echo "Cloning OpenSSL version $OPENSSL_VERSION"
89-
git clone --depth=1 -b $OPENSSL_SOURCE_TAG $GIT_URL
93+
echo "Cloning OpenSSL version $OPENSSL_VERSION from $OPENSSL_URL"
94+
git clone --depth=1 -b $OPENSSL_SOURCE_TAG $OPENSSL_URL
9095

9196
echo $OPENSSL_SOURCE_TAG > openssl/openssl_version.txt

get_source.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
# ===========================================================================
3-
# (c) Copyright IBM Corp. 2017, 2021 All Rights Reserved
3+
# (c) Copyright IBM Corp. 2017, 2022 All Rights Reserved
44
# ===========================================================================
55
#
66
# This code is free software; you can redistribute it and/or modify it
@@ -41,6 +41,7 @@ usage() {
4141
echo " -omr-sha a commit SHA for the omr repository"
4242
echo " -omr-reference a local repo to use as a clone reference"
4343
echo " -parallel (boolean) if 'true' then the clone j9 repository commands run in parallel, default is false"
44+
echo " --openssl-repo Specify the OpenSSL repository to download from"
4445
echo " --openssl-version Specify the version of OpenSSL source to download"
4546
echo ""
4647
exit 1
@@ -60,6 +61,10 @@ for i in "$@" ; do
6061
j9options="${j9options} ${i}"
6162
;;
6263

64+
--openssl-repo=* )
65+
openssloptions="${openssloptions} ${i}"
66+
;;
67+
6368
--openssl-version=* )
6469
DOWNLOAD_OPENSSL=true
6570
openssloptions="${openssloptions} ${i}"

0 commit comments

Comments
 (0)