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 <marcoippolito54@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Luigi Pinca
2023-06-20 11:11:55 +02:00
committed by GitHub
parent 43c3d9f9b4
commit e7646a5dc0

View File

@@ -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*"