Skip to content

Commit 01779f8

Browse files
authored
Merge pull request #784 from keithc-ca/get_source
Update get_source.sh
2 parents 47457a1 + 8f2769a commit 01779f8

File tree

1 file changed

+3
-31
lines changed

1 file changed

+3
-31
lines changed

get_source.sh

+3-31
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
# exit immediately if any unexpected error occurs
2323
set -e
2424

25-
openssloptions=""
26-
DOWNLOAD_OPENSSL=false
27-
2825
# These maps are keyed by the prefix of option names (e.g. openj9, omr).
2926
declare -A source_branch # branch or tag
3027
declare -A source_folder # local working directory
@@ -140,35 +137,10 @@ process_options() {
140137
local version=""
141138

142139
for arg in "$@" ; do
143-
# temporarily handle openssl options that don't follow the general pattern
144-
case "$arg" in
145-
--openssl-repo=*)
146-
# remove leading '-'
147-
arg="${arg/--/-}"
148-
;;
149-
--openssl-version=*)
150-
# map to -openssl-branch
151-
version="${arg#*=}"
152-
case "$version" in
153-
1.0.2* | 1.1.*)
154-
version="OpenSSL_${version//./_}"
155-
;;
156-
3.*)
157-
version="openssl-$version"
158-
;;
159-
*)
160-
;;
161-
esac
162-
arg=-openssl-branch=$version
163-
;;
164-
*)
165-
;;
166-
esac
167-
168140
if [[ "$arg" =~ -([A-Za-z0-9]+)-(branch|reference|repo|sha)=.* ]] ; then
169141
local key="${BASH_REMATCH[1]}"
170142
if [ -z "${source_folder[${key}]}" ] ; then
171-
fail "Unknown option: $arg"
143+
fail "Unknown option: '$arg'"
172144
fi
173145

174146
local value="${arg#*=}"
@@ -197,7 +169,7 @@ process_options() {
197169
break
198170
;;
199171
*)
200-
# bad option
172+
fail "Unknown option: '$arg'"
201173
usage
202174
;;
203175
esac
@@ -234,7 +206,7 @@ clone_or_update_repos() {
234206
cd - > /dev/null
235207
else
236208
echo
237-
echo "Clone repository: $folder"
209+
echo "Cloning $folder version $branch from $url"
238210
echo
239211

240212
git clone \

0 commit comments

Comments
 (0)