Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
taoliult committed Nov 2, 2023
1 parent 4f02fdc commit 9f53f7c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 27 deletions.
44 changes: 20 additions & 24 deletions closed/get_j9_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ usage() {
echo " -openjceplus-reference a local repo to use as a clone reference"
echo " -with-gskit-bin the GSKit binary url"
echo " -with-gskit-sdk-bin the GSKIT SDK binary url"
echo " -with-gskit-bin-username the username for downloading the GSKit and GSKit SDK from artifactory"
echo " -with-gskit-bin-credential the credential for downloading the GSKit and GSKit SDK from repository or artifactory"
echo " -with-gskit-bin-credential the credential for downloading the GSKit and GSKit SDK from artifactory"
echo " -parallel (boolean) if 'true' then the clone j9 repository commands run in parallel, default is false"
echo ""
exit 1
Expand Down Expand Up @@ -136,10 +135,6 @@ for i in "$@" ; do
gskit_sdk_bin="${i#*=}"
;;

-with-gskit-bin-username=* )
gskit_bin_username="${i#*=}"
;;

-with-gskit-bin-credential=* )
gskit_bin_credential="${i#*=}"
;;
Expand Down Expand Up @@ -217,31 +212,32 @@ fi
openjceplus_source="OpenJCEPlus"
if [ "${git_urls[$openjceplus_source]}" ]; then

echo
echo "$openjceplus_source exists, download ICC binaries"
echo
echo
echo "$openjceplus_source exists, download ICC binaries"
echo

cd $openjceplus_source
mkdir -p ./icc/jgsk_sdk/lib64/
cd $openjceplus_source
mkdir -p ./icc/jgsk_sdk/lib64/

if [ $gskit_bin_username ]; then
# $gskit_bin_username exist, download using username and token from artifactory
curl -vk -u "$gskit_bin_username:$gskit_bin_credential" -X GET $gskit_bin > ./icc/jgsk_crypto.tar
curl -vk -u "$gskit_bin_username:$gskit_bin_credential" -X GET $gskit_sdk_bin > ./icc/jgsk_crypto_sdk.tar
else
# $gskit_bin_username doesn't exist, download using token from repository
curl -H "Authorization: Bearer $gskit_bin_credential" -H "Accept: application/octet-stream" -L $gskit_bin --output ./icc/jgsk_crypto.tar
curl -H "Authorization: Bearer $gskit_bin_credential" -H "Accept: application/octet-stream" -L $gskit_sdk_bin --output ./icc/jgsk_crypto_sdk.tar
fi
if [ $gskit_bin_credential ]; then
# Download GSKit binaries from artifactory
curl -vk -u "$gskit_bin_credential" -X GET $gskit_bin > ./icc/jgsk_crypto.tar
curl -vk -u "$gskit_bin_credential" -X GET $gskit_sdk_bin > ./icc/jgsk_crypto_sdk.tar
else
echo
echo "GSKit binaries are needed for compiling $openjceplus_source"
echo "Please set -with-gskit-bin, -with-gskit-sdk-bin, and -with-gskit-bin-credential"
exit 1
fi

tar -xf ./icc/jgsk_crypto_sdk.tar -C ./icc/
tar -xf ./icc/jgsk_crypto.tar -C ./icc/jgsk_sdk/lib64/

# Create OpenJCEPlus Java module folder
mkdir -p ./src/main/openjceplus/share/classes/
cp -r ./src/main/java/* ./src/main/openjceplus/share/classes/
# Create OpenJCEPlus Java module folder
mkdir -p ./src/main/openjceplus/share/classes/
cp -r ./src/main/java/* ./src/main/openjceplus/share/classes/

cd ..
cd ..
fi

END_TIME=$(date +%s)
Expand Down
5 changes: 2 additions & 3 deletions get_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ usage() {
echo " -openjceplus-reference a local repo to use as a clone reference"
echo " -with-gskit-bin the GSKit binary url"
echo " -with-gskit-sdk-bin the GSKIT SDK binary url"
echo " -with-gskit-bin-username the username for downloading the GSKit and GSKit SDK from artifactory"
echo " -with-gskit-bin-credential the credential for downloading the GSKit and GSKit SDK from repository or artifactory"
echo " -with-gskit-bin-credential the credential for downloading the GSKit and GSKit SDK from artifactory"
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"
Expand All @@ -65,7 +64,7 @@ for i in "$@" ; do
usage
;;

-openj9-repo=* | -openj9-branch=* | -openj9-sha=* | -openj9-reference=* | -omr-repo=* | -omr-branch=* | -omr-sha=* | -omr-reference=* | -openjceplus-repo=* | -openjceplus-branch=* | -openjceplus-sha=* | -openjceplus-reference=* | -with-gskit-bin=* | -with-gskit-sdk-bin=* | -with-gskit-bin-username=* | -with-gskit-bin-credential=* | -parallel=* )
-openj9-repo=* | -openj9-branch=* | -openj9-sha=* | -openj9-reference=* | -omr-repo=* | -omr-branch=* | -omr-sha=* | -omr-reference=* | -openjceplus-repo=* | -openjceplus-branch=* | -openjceplus-sha=* | -openjceplus-reference=* | -with-gskit-bin=* | -with-gskit-sdk-bin=* | -with-gskit-bin-credential=* | -parallel=* )
j9options="${j9options} ${i}"
;;

Expand Down

0 comments on commit 9f53f7c

Please sign in to comment.