From 9711bc24f69ac3fafb5c366f5e56d7f408fdd4a6 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Tue, 20 Jun 2023 11:11:55 +0200 Subject: [PATCH] tools: replace sed with perl For cross-platform compatibility use perl instead of sed. Fixes: https://github.com/nodejs/node/issues/48496 PR-URL: https://github.com/nodejs/node/pull/48499 Reviewed-By: Marco Ippolito Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Mestery Reviewed-By: Rafael Gonzaga Reviewed-By: James M Snell --- tools/dep_updaters/update-icu.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/dep_updaters/update-icu.sh b/tools/dep_updaters/update-icu.sh index 1a5a57853f477c..3ec891cd936c41 100755 --- a/tools/dep_updaters/update-icu.sh +++ b/tools/dep_updaters/update-icu.sh @@ -55,9 +55,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*"