From debe89843e1f486c669bc5e74dab9eafd15f49e3 Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Thu, 27 Apr 2023 10:02:04 +0200 Subject: [PATCH] fix: md5 from source --- tools/dep_updaters/update-icu.sh | 13 +++++++++---- tools/icu/current_ver.dep | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tools/dep_updaters/update-icu.sh b/tools/dep_updaters/update-icu.sh index c9b654581947aa..ad0df62837d747 100755 --- a/tools/dep_updaters/update-icu.sh +++ b/tools/dep_updaters/update-icu.sh @@ -31,17 +31,22 @@ fi NEW_MAJOR_VERSION=$(echo "$NEW_VERSION" | cut -d '.' -f1) NEW_MINOR_VERSION=$(echo "$NEW_VERSION" | cut -d '.' -f2) -NEW_VERSION_TGZ="https://github.com/unicode-org/icu/releases/download/release-${NEW_VERSION}/icu4c-${NEW_MAJOR_VERSION}_${NEW_MINOR_VERSION}-src.tgz" -./configure --with-intl=full-icu --with-icu-source="$NEW_VERSION_TGZ" +NEW_VERSION_TGZ="icu4c-${NEW_MAJOR_VERSION}_${NEW_MINOR_VERSION}-src.tgz" + +NEW_VERSION_TGZ_URL="https://github.com/unicode-org/icu/releases/download/release-${NEW_MAJOR_VERSION}-${NEW_MINOR_VERSION}/$NEW_VERSION_TGZ" + +NEW_VERSION_MD5="https://github.com/unicode-org/icu/releases/download/release-${NEW_MAJOR_VERSION}-${NEW_MINOR_VERSION}/icu4c-${NEW_MAJOR_VERSION}_${NEW_MINOR_VERSION}-src.md5" + +./configure --with-intl=full-icu --with-icu-source="$NEW_VERSION_TGZ_URL" "$TOOLS_DIR/icu/shrink-icu-src.py" rm -rf "$DEPS_DIR/icu" -CHECKSUM=$(curl -s "$NEW_VERSION_TGZ" | md5sum | cut -d ' ' -f1) +CHECKSUM=$(curl -sL "$NEW_VERSION_MD5" | grep "$NEW_VERSION_TGZ" | grep -v "\.asc$" | awk '{print $1}') -sed -i '' -e "s|\"url\": \"\(.*\)\".*|\"url\": \"$NEW_VERSION_TGZ\",|" "$TOOLS_DIR/icu/current_ver.dep" +sed -i '' -e "s|\"url\": \"\(.*\)\".*|\"url\": \"$NEW_VERSION_TGZ_URL\",|" "$TOOLS_DIR/icu/current_ver.dep" sed -i '' -e "s|\"md5\": \"\(.*\)\".*|\"md5\": \"$CHECKSUM\"|" "$TOOLS_DIR/icu/current_ver.dep" diff --git a/tools/icu/current_ver.dep b/tools/icu/current_ver.dep index 9e5339a9bbdcc7..90cb28f74a0bfc 100644 --- a/tools/icu/current_ver.dep +++ b/tools/icu/current_ver.dep @@ -1,6 +1,6 @@ [ { - "url": "https://github.com/unicode-org/icu/releases/download/release-73-1/icu4c-73_1-src.zip", + "url": "https://github.com/unicode-org/icu/releases/download/release-73-1/icu4c-73_1-src.tgz", "md5": "6556e2a18b137e80a06a11060a08762b" } ]