From b585516eb8fb55f75e356965b4ea09237bbb30fd Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sun, 30 Oct 2022 03:07:32 +0100 Subject: [PATCH 1/2] tools: refactor dynamic strings creation in shell scripts --- tools/license-builder.sh | 60 ++++++++++++++++++++-------------------- tools/update-cares.sh | 4 +-- tools/update-llhttp.sh | 4 +-- tools/update-nghttp2.sh | 4 +-- tools/update-npm.sh | 6 ++-- 5 files changed, 39 insertions(+), 39 deletions(-) diff --git a/tools/license-builder.sh b/tools/license-builder.sh index b50732e0c14e57..c342a9672bcec8 100755 --- a/tools/license-builder.sh +++ b/tools/license-builder.sh @@ -30,91 +30,91 @@ fi # Dependencies bundled in distributions -licenseText="$(cat "${rootdir}"/deps/acorn/acorn/LICENSE)" +licenseText="$(cat "${rootdir}/deps/acorn/acorn/LICENSE")" addlicense "Acorn" "deps/acorn" "$licenseText" -licenseText="$(tail -n +3 "${rootdir}"/deps/cares/LICENSE.md)" +licenseText="$(tail -n +3 "${rootdir}/deps/cares/LICENSE.md")" addlicense "c-ares" "deps/cares" "$licenseText" -licenseText="$(cat "${rootdir}"/deps/cjs-module-lexer/LICENSE)" +licenseText="$(cat "${rootdir}/deps/cjs-module-lexer/LICENSE")" addlicense "cjs-module-lexer" "deps/cjs-module-lexer" "$licenseText" if [ -f "${rootdir}/deps/icu/LICENSE" ]; then # ICU 57 and following. Drop the BOM - licenseText="$(sed -e '1s/^[^a-zA-Z ]*ICU/ICU/' -e :a -e 's/<[^>]*>//g;s/ / /g;s/ +$//;/ Date: Sun, 30 Oct 2022 21:16:57 +0100 Subject: [PATCH 2/2] fixup! Co-authored-by: Luigi Pinca --- tools/license-builder.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/license-builder.sh b/tools/license-builder.sh index c342a9672bcec8..d9d10f6b68ff45 100755 --- a/tools/license-builder.sh +++ b/tools/license-builder.sh @@ -91,7 +91,7 @@ licenseText="$(cat "${rootdir}/tools/inspector_protocol/markupsafe/LICENSE")" addlicense "markupsafe" "tools/inspector_protocol/markupsafe" "$licenseText" # Testing tools -licenseText="$(sed -e '/^$/,$d' -e 's/^#$//' -e 's/^# //' "${rootdir}/tools/cpplint.py | tail -n +3")" +licenseText="$(sed -e '/^$/,$d' -e 's/^#$//' -e 's/^# //' "${rootdir}/tools/cpplint.py" | tail -n +3)" addlicense "cpplint.py" "tools/cpplint.py" "$licenseText" licenseText="$(cat "${rootdir}/tools/node_modules/eslint/LICENSE")" addlicense "ESLint" "tools/node_modules/eslint" "$licenseText"