package uploader: skip packages with custom licenses

Try to detect packages with custom licenses and just skip them
so upload of other packages will be finished successfully.
This commit is contained in:
Leonid Pliushch 2019-03-11 20:36:19 +02:00
parent 9ca57fbef1
commit 4ce0e267d0

View File

@ -65,6 +65,10 @@ if [ -z "$(command -v find)" ]; then
echo "[!] Package 'findutils' is not installed."
exit 1
fi
if [ -z "$(command -v grep)" ]; then
echo "[!] Package 'grep' is not installed."
exit 1
fi
if [ -z "$(command -v jq)" ]; then
echo "[!] Package 'jq' is not installed."
exit 1
@ -307,6 +311,9 @@ process_packages() {
if [ -z "${PACKAGE_METADATA['LICENSES']}" ]; then
echo "[!] Mandatory field 'TERMUX_PKG_LICENSE' of package '$package_name' is empty." >&2
exit 1
elif grep -qP '.*custom.*' <(echo "${PACKAGE_METADATA['LICENSES']}"); then
echo "[!] Package '$package_name' has custom license, skipping." >&2
continue
fi
PACKAGE_METADATA["DESCRIPTION"]=$(extract_variable_from_buildsh "TERMUX_PKG_DESCRIPTION" "$buildsh_path")