Skip to content

Commit

Permalink
tools: replace sed with perl
Browse files Browse the repository at this point in the history
For cross-platform compatibility use perl instead of sed.

Fixes: #48496
  • Loading branch information
lpinca committed Jun 19, 2023
1 parent 9bdd172 commit 0524a7a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tools/dep_updaters/update-icu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ if [ "$CHECKSUM" != "$GENERATED_CHECKSUM" ]; then
exit 0
fi

sed -i '' -e "s|\"url\": \"\(.*\)\".*|\"url\": \"$NEW_VERSION_TGZ_URL\",|" "$TOOLS_DIR/icu/current_ver.dep"
perl -i -pe "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"
perl -i -pe "s|\"md5\": .*|\"md5\": \"$CHECKSUM\"|" "$TOOLS_DIR/icu/current_ver.dep"

rm -rf out "$DEPS_DIR/icu" "$DEPS_DIR/icu4c*"

Expand Down
2 changes: 1 addition & 1 deletion tools/icu/current_ver.dep
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"url": "https://github.com/unicode-org/icu/releases/download/release-73-1/icu4c-73_1-src.zip",
"url": "aaa",
"md5": "6556e2a18b137e80a06a11060a08762b"
}
]

0 comments on commit 0524a7a

Please sign in to comment.