diff --git a/scripts/temurin-sync.sh b/scripts/temurin-sync.sh index cabf62f..2385361 100644 --- a/scripts/temurin-sync.sh +++ b/scripts/temurin-sync.sh @@ -41,7 +41,7 @@ do if [[ "${JVERSION}" != "21" ]] then DLDEETS32=$(dljdkfileinfo32 $JVERSION ${DIST}) - JAVADEETS32=$(curl -s -L -X 'GET' $(echo $DLDEETS32 | jq -r '.links.pkg_info_uri')) + JAVADEETS32=$(curl -s -L -X 'GET' $(echo $DLDEETS32 | jq -r '.links.pkg_info_uri' | head -1)) JAVAFILE32=$(echo $JAVADEETS32 | jq -r .result[].filename) CHECKSUMTYPE32=$(echo $JAVADEETS32 | jq -r .result[].checksum_type) DLURL32=$(echo $JAVADEETS32 | jq -r ".result[].direct_download_uri") @@ -49,7 +49,7 @@ do SHA256NEW32=$(echo $JAVADEETS32 | jq -r .result[].checksum) SHA256ORIG32=$(grep -iv "checksumtype\|checksum64" ${TEMFOLDNAME}/tools/chocolateyinstall.ps1 | grep -i checksum | awk -F\' '{print $2}') - URLORIG32=$(grep -i "url64" ${TEMFOLDNAME}/tools/chocolateyinstall.ps1 | head -1 | awk -F\' '{print $2}') + URLORIG32=$(grep -i "url" ${TEMFOLDNAME}/tools/chocolateyinstall.ps1 | grep -i -v "url64" | head -1 | awk -F\' '{print $2}') fi echo "$JVERSION $JAVATYPE has SHA256ORIG $SHA256ORIG and SHA256NEW $SHA256NEW" @@ -100,8 +100,8 @@ do if [[ "${JVERSION}" != "21" ]] then - DLDEETS32=$(dljdkfileinfo32 $JVERSION ${DIST}) - JAVADEETS32=$(curl -s -L -X 'GET' $(echo $DLDEETS32 | jq -r '.links.pkg_info_uri')) + DLDEETS32=$(dljrefileinfo32 $JVERSION ${DIST}) + JAVADEETS32=$(curl -s -L -X 'GET' $(echo $DLDEETS32 | jq -r '.links.pkg_info_uri' | head -1)) JAVAFILE32=$(echo $JAVADEETS32 | jq -r .result[].filename) CHECKSUMTYPE32=$(echo $JAVADEETS32 | jq -r .result[].checksum_type) DLURL32=$(echo $JAVADEETS32 | jq -r ".result[].direct_download_uri") @@ -109,7 +109,7 @@ do SHA256NEW32=$(echo $JAVADEETS32 | jq -r .result[].checksum) SHA256ORIG32=$(grep -iv "checksumtype\|checksum64" ${TEMFOLDNAME}/tools/chocolateyinstall.ps1 | grep -i checksum | awk -F\' '{print $2}') - URLORIG32=$(grep -i "url64" ${TEMFOLDNAME}/tools/chocolateyinstall.ps1 | head -1 | awk -F\' '{print $2}') + URLORIG32=$(grep -i "url" ${TEMFOLDNAME}/tools/chocolateyinstall.ps1 | grep -i -v "url64" | head -1 | awk -F\' '{print $2}') fi echo "$JVERSION $JAVATYPE has SHA256ORIG $SHA256ORIG and SHA256NEW $SHA256NEW"