diff --git a/get_source.sh b/get_source.sh index 23fcf7f3b1b..a058f631a69 100755 --- a/get_source.sh +++ b/get_source.sh @@ -22,9 +22,6 @@ # exit immediately if any unexpected error occurs set -e -openssloptions="" -DOWNLOAD_OPENSSL=false - # These maps are keyed by the prefix of option names (e.g. openj9, omr). declare -A source_branch # branch or tag declare -A source_folder # local working directory @@ -139,35 +136,10 @@ process_options() { local version="" for arg in "$@" ; do - # temporarily handle openssl options that don't follow the general pattern - case "$arg" in - --openssl-repo=*) - # remove leading '-' - arg="${arg/--/-}" - ;; - --openssl-version=*) - # map to -openssl-branch - version="${arg#*=}" - case "$version" in - 1.0.2* | 1.1.*) - version="OpenSSL_${version//./_}" - ;; - 3.*) - version="openssl-$version" - ;; - *) - ;; - esac - arg=-openssl-branch=$version - ;; - *) - ;; - esac - if [[ "$arg" =~ -([A-Za-z0-9]+)-(branch|reference|repo|sha)=.* ]] ; then local key="${BASH_REMATCH[1]}" if [ -z "${source_folder[${key}]}" ] ; then - fail "Unknown option: $arg" + fail "Unknown option: '$arg'" fi local value="${arg#*=}" @@ -187,7 +159,7 @@ process_options() { break ;; *) - # bad option + fail "Unknown option: '$arg'" usage ;; esac @@ -224,7 +196,7 @@ clone_or_update_repos() { cd - > /dev/null else echo - echo "Clone repository: $folder" + echo "Cloning $folder version $branch from $url" echo git clone \