package_uploader.sh: handle licenses "custom" and "non-free"

This commit is contained in:
Leonid Pliushch 2019-04-12 17:21:34 +03:00
parent acacf14861
commit 8b2ae5b3e8
1 changed files with 3 additions and 5 deletions

View File

@ -142,7 +142,7 @@ emergency_exit() {
json_metadata_dump() {
local old_ifs=$IFS
local license
local pkg_licenses
local pkg_licenses=""
IFS=","
for license in ${PACKAGE_METADATA['LICENSES']}; do
@ -550,10 +550,8 @@ process_packages() {
msg " * ${package_name}: skipping because field 'TERMUX_PKG_LICENSE' is empty."
SCRIPT_ERROR_EXIT=true
continue
elif grep -qP '.*custom.*' <(echo "${PACKAGE_METADATA['LICENSES']}"); then
msg " * ${package_name}: skipping because it has custom license."
SCRIPT_ERROR_EXIT=true
continue
elif grep -qP '.*(custom|non-free).*' <(echo "${PACKAGE_METADATA['LICENSES']}"); then
PACKAGE_METADATA["LICENSES"]=""
fi
PACKAGE_METADATA["DESCRIPTION"]=$(get_package_property "$package_name" "TERMUX_PKG_DESCRIPTION")