Skip to content

Commit c96800a

Browse files
richardlauMyles Borins
authored and
Myles Borins
committed
tools: fix license-builder.sh for ICU
Modify tools/license-builder.sh to restore the Third-Party Software licenses for ICU. Also fix arguments to tail to work on Linux. rvagg: modified sed command for ICU to replace tabs with spaces and remove whitespace at the end of lines PR-URL: #4762 Reviewed-By: Rod Vagg <[email protected]>
1 parent 36a4159 commit c96800a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/license-builder.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ addlicense "c-ares" "deps/cares" \
3333
"$(sed -e '/^ \*\/$/,$d' -e '/^$/d' -e 's/^[/ ]\* *//' ${rootdir}/deps/cares/src/ares_init.c)"
3434
addlicense "HTTP Parser" "deps/http_parser" "$(cat deps/http_parser/LICENSE-MIT)"
3535
addlicense "ICU" "deps/icu" \
36-
"$(sed -e '1,/COPYRIGHT AND PERMISSION NOTICE/d' -e '/^<hr/,$d' -e 's/^<\/*p>$//' ${rootdir}/deps/icu/license.html)"
36+
"$(sed -e '1,/ICU License - ICU 1\.8\.1 and later/d' -e :a \
37+
-e 's/<[^>]*>//g;s/ / /g;s/ +$//;/</N;//ba' ${rootdir}/deps/icu/license.html)"
3738
addlicense "libuv" "deps/uv" "$(cat ${rootdir}/deps/uv/LICENSE)"
3839
addlicense "OpenSSL" "deps/openssl" \
3940
"$(sed -e '/^ \*\/$/,$d' -e '/^ [^*].*$/d' -e '/\/\*.*$/d' -e '/^$/d' -e 's/^[/ ]\* *//' ${rootdir}/deps/openssl/openssl/LICENSE)"
@@ -53,7 +54,7 @@ addlicense "marked" "tools/doc/node_modules/marked" \
5354

5455
# Testing tools
5556
addlicense "cpplint.py" "tools/cpplint.py" \
56-
"$(sed -e '/^$/,$d' -e 's/^#$//' -e 's/^# //' ${rootdir}/tools/cpplint.py | tail +3)"
57+
"$(sed -e '/^$/,$d' -e 's/^#$//' -e 's/^# //' ${rootdir}/tools/cpplint.py | tail -n +3)"
5758
addlicense "ESLint" "tools/eslint" "$(cat ${rootdir}/tools/eslint/LICENSE)"
5859
addlicense "gtest" "deps/gtest" "$(cat ${rootdir}/deps/gtest/LICENSE)"
5960
addlicense "node-weak" "test/gc/node_modules/weak" \

0 commit comments

Comments
 (0)