tools: fix update-icu script

Closes: https://github.com/nodejs/node/issues/60506
PR-URL: https://github.com/nodejs/node/pull/60521
Fixes: https://github.com/nodejs/node/issues/60506
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This commit is contained in:
Michaël Zasso 2025-11-01 09:34:43 +01:00 committed by GitHub
parent 3c248c3556
commit e1e0830ae5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -32,15 +32,11 @@ CURRENT_VERSION="$(grep "#define U_ICU_VERSION " "$ICU_VERSION_H" | cut -d'"' -f
# This function exit with 0 if new version and current version are the same # This function exit with 0 if new version and current version are the same
compare_dependency_version "icu-small" "$NEW_VERSION" "$CURRENT_VERSION" compare_dependency_version "icu-small" "$NEW_VERSION" "$CURRENT_VERSION"
DASHED_NEW_VERSION=$(echo "$NEW_VERSION" | sed 's/\./-/g') NEW_VERSION_TGZ="icu4c-${NEW_VERSION}-sources.tgz"
LOW_DASHED_NEW_VERSION=$(echo "$NEW_VERSION" | sed 's/\./_/g') NEW_VERSION_TGZ_URL="https://github.com/unicode-org/icu/releases/download/release-${NEW_VERSION}/${NEW_VERSION_TGZ}"
NEW_VERSION_TGZ="icu4c-${LOW_DASHED_NEW_VERSION}-src.tgz" NEW_VERSION_MD5="https://github.com/unicode-org/icu/releases/download/release-${NEW_VERSION}/icu4c-${NEW_VERSION}-sources.md5"
NEW_VERSION_TGZ_URL="https://github.com/unicode-org/icu/releases/download/release-${DASHED_NEW_VERSION}/$NEW_VERSION_TGZ"
NEW_VERSION_MD5="https://github.com/unicode-org/icu/releases/download/release-${DASHED_NEW_VERSION}/icu4c-${LOW_DASHED_NEW_VERSION}-sources.md5"
CHECKSUM=$(curl -sL "$NEW_VERSION_MD5" | grep "$NEW_VERSION_TGZ" | grep -v "\.asc$" | awk '{print $1}') CHECKSUM=$(curl -sL "$NEW_VERSION_MD5" | grep "$NEW_VERSION_TGZ" | grep -v "\.asc$" | awk '{print $1}')