Skip to content

Commit d2094ba

Browse files
committed
chore: minor changes
Signed-off-by: ale5000 <15793015+ale5000-git@users.noreply.github.com>
1 parent 258467a commit d2094ba

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

build.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,11 @@ rm -rf "${TEMP_DIR:?}"/zip-content/misc/aapt || ui_error 'Failed to delete unuse
259259
rm -f "${TEMP_DIR:?}"/zip-content/misc/busybox/busybox-mips* || ui_error 'Failed to delete unused files in the temp dir'
260260

261261
# Do not ship licenses of components used only by the repo and not by the produced zip
262-
rm -f "${TEMP_DIR:?}"/zip-content/LICENSES/LGPL-3.0-or-later.txt || ui_error 'Failed to delete unused licenses in the temp dir'
263-
rm -f "${TEMP_DIR:?}"/zip-content/LICENSES/Info-ZIP.txt || ui_error 'Failed to delete unused licenses in the temp dir'
264-
rm -f "${TEMP_DIR:?}"/zip-content/LICENSES/Unlicense.txt || ui_error 'Failed to delete unused licenses in the temp dir'
262+
for _license in 'Apache-2.0' 'CC0-1.0' 'Info-ZIP' 'LGPL-3.0-or-later' 'Unlicense'; do
263+
if conf_common_should_skip_license "${_license:?}"; then
264+
rm -f "${TEMP_DIR:?}"/zip-content/LICENSES/"${_license:?}.txt" || ui_error 'Failed to delete unused licenses in the temp dir'
265+
fi
266+
done
265267

266268
# Verify bundled application files to ensure package integrity; downloaded files have already been validated
267269
if test -e "${TEMP_DIR:?}/zip-content/origin/file-list.dat"; then

conf/conf-common.inc.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ conf_is_oss_only_build_enabled()
77
return 1
88
}
99

10+
conf_common_should_skip_license()
11+
{
12+
case "${1:?}" in
13+
'Apache-2.0' | 'Info-ZIP' | 'LGPL-3.0-or-later' | 'Unlicense') return 0 ;; # Skipped from the generated zip
14+
*) ;;
15+
esac
16+
17+
return 1
18+
}
19+
1020
conf_oss_files_to_download()
1121
{
1222
cat << 'EOF'

0 commit comments

Comments
 (0)