Skip to content

Commit 44862bf

Browse files
fix: md5 from source
1 parent 197642a commit 44862bf

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

tools/dep_updaters/update-icu.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,22 @@ fi
3131
NEW_MAJOR_VERSION=$(echo "$NEW_VERSION" | cut -d '.' -f1)
3232
NEW_MINOR_VERSION=$(echo "$NEW_VERSION" | cut -d '.' -f2)
3333

34-
NEW_VERSION_TGZ="https://github.com/unicode-org/icu/releases/download/release-${NEW_VERSION}/icu4c-${NEW_MAJOR_VERSION}_${NEW_MINOR_VERSION}-src.tgz"
3534

36-
./configure --with-intl=full-icu --with-icu-source="$NEW_VERSION_TGZ"
35+
NEW_VERSION_TGZ="icu4c-${NEW_MAJOR_VERSION}_${NEW_MINOR_VERSION}-src.tgz"
36+
37+
NEW_VERSION_TGZ_URL="https://github.com/unicode-org/icu/releases/download/release-${NEW_MAJOR_VERSION}-${NEW_MINOR_VERSION}/$NEW_VERSION_TGZ"
38+
39+
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"
40+
41+
./configure --with-intl=full-icu --with-icu-source="$NEW_VERSION_TGZ_URL"
3742

3843
"$TOOLS_DIR/icu/shrink-icu-src.py"
3944

4045
rm -rf "$DEPS_DIR/icu"
4146

42-
CHECKSUM=$(curl -s "$NEW_VERSION_TGZ" | md5sum | cut -d ' ' -f1)
47+
CHECKSUM=$(curl -sL "$NEW_VERSION_MD5" | grep "$NEW_VERSION_TGZ" | grep -v "\.asc$" | awk '{print $1}')
4348

44-
sed -i '' -e "s|\"url\": \"\(.*\)\".*|\"url\": \"$NEW_VERSION_TGZ\",|" "$TOOLS_DIR/icu/current_ver.dep"
49+
sed -i '' -e "s|\"url\": \"\(.*\)\".*|\"url\": \"$NEW_VERSION_TGZ_URL\",|" "$TOOLS_DIR/icu/current_ver.dep"
4550

4651
sed -i '' -e "s|\"md5\": \"\(.*\)\".*|\"md5\": \"$CHECKSUM\"|" "$TOOLS_DIR/icu/current_ver.dep"
4752

0 commit comments

Comments
 (0)