File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -259,9 +259,11 @@ rm -rf "${TEMP_DIR:?}"/zip-content/misc/aapt || ui_error 'Failed to delete unuse
259259rm -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
267269if test -e " ${TEMP_DIR:? } /zip-content/origin/file-list.dat" ; then
Original file line number Diff line number Diff 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+
1020conf_oss_files_to_download ()
1121{
1222 cat << 'EOF '
You can’t perform that action at this time.
0 commit comments