Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9545c41

Browse filesBrowse files
Myles Borinsevanlucas
authored andcommitted
tools: fix license builder to work with icu-small
Currently the license builder is expecting the ICU package to be found at `deps/icu`. ICU is now included by default and found at `deps/icu-small`. This commit adds logic to find the license at the new location. This could likely be done in a more elegant way, but it works! PR-URL: #7119 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Steven R Loomis <srloomis@us.ibm.com>
1 parent 257f4e6 commit 9545c41
Copy full SHA for 9545c41

File tree

Expand file treeCollapse file tree

1 file changed

+11
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-1
lines changed
Open diff view settings
Collapse file

‎tools/license-builder.sh‎

Copy file name to clipboardExpand all lines: tools/license-builder.sh
+11-1Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ $(echo -e "$3" | sed -e 's/^/ /' -e 's/^ $//' -e 's/ *$//' | sed -e '/./,$
2222
}
2323

2424

25-
if ! [ -d "${rootdir}/deps/icu/" ]; then
25+
if ! [ -d "${rootdir}/deps/icu/" ] && ! [ -d "${rootdir}/deps/icu-small/" ]; then
2626
echo "ICU not installed, run configure to download it, e.g. ./configure --with-intl=small-icu --download=icu"
2727
exit 1
2828
fi
@@ -42,6 +42,16 @@ elif [ -f "${rootdir}/deps/icu/license.html" ]; then
4242
addlicense "ICU" "deps/icu" \
4343
"$(sed -e '1,/ICU License - ICU 1\.8\.1 and later/d' -e :a \
4444
-e 's/<[^>]*>//g;s/ / /g;s/ +$//;/</N;//ba' ${rootdir}/deps/icu/license.html)"
45+
elif [ -f "${rootdir}/deps/icu-small/LICENSE" ]; then
46+
# ICU 57 and following. Drop the BOM
47+
addlicense "ICU" "deps/icu-small" \
48+
"$(sed -e '1s/^[^a-zA-Z ]*ICU/ICU/' -e :a \
49+
-e 's/<[^>]*>//g;s/ / /g;s/ +$//;/</N;//ba' ${rootdir}/deps/icu-small/LICENSE)"
50+
elif [ -f "${rootdir}/deps/icu-small/license.html" ]; then
51+
# ICU 56 and prior
52+
addlicense "ICU" "deps/icu-small" \
53+
"$(sed -e '1,/ICU License - ICU 1\.8\.1 and later/d' -e :a \
54+
-e 's/<[^>]*>//g;s/ / /g;s/ +$//;/</N;//ba' ${rootdir}/deps/icu-small/license.html)"
4555
else
4656
echo "Could not find an ICU license file."
4757
exit 1

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.