mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
scripts/create_addon: output diagnostic when filter not matching
This commit is contained in:
parent
78d97cc12b
commit
a8d6e99f82
@ -69,6 +69,7 @@ get_addons() {
|
|||||||
[ ${exited} -eq 1 ] && continue
|
[ ${exited} -eq 1 ] && continue
|
||||||
|
|
||||||
validpkg="no"
|
validpkg="no"
|
||||||
|
VERIFY_FAIL=
|
||||||
# Should only build embedded addons when they are explictly specified in the addon list
|
# Should only build embedded addons when they are explictly specified in the addon list
|
||||||
if [ "${PKG_IS_ADDON}" = "embedded" ]; then
|
if [ "${PKG_IS_ADDON}" = "embedded" ]; then
|
||||||
if [ -n "${filter}" ]; then
|
if [ -n "${filter}" ]; then
|
||||||
@ -81,6 +82,8 @@ get_addons() {
|
|||||||
if [ "${validpkg}" = "yes" ]; then
|
if [ "${validpkg}" = "yes" ]; then
|
||||||
echo "${PKG_NAME}"
|
echo "${PKG_NAME}"
|
||||||
count=$((count + 1))
|
count=$((count + 1))
|
||||||
|
elif [ -n "${VERIFY_FAIL}" -a -n "${filter}" ]; then
|
||||||
|
echo "$(print_color CLR_ERROR "${PKG_NAME}"): ${VERIFY_FAIL}" >&2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -96,6 +99,7 @@ get_addons() {
|
|||||||
# Return 0 if package is a suitable addon, 1 otherwise
|
# Return 0 if package is a suitable addon, 1 otherwise
|
||||||
verify_addon() {
|
verify_addon() {
|
||||||
if [ -n "${PKG_ARCH}" ]; then
|
if [ -n "${PKG_ARCH}" ]; then
|
||||||
|
VERIFY_FAIL="Incompatible arch: \"${TARGET_ARCH}\" not in [ ${PKG_ARCH} ]"
|
||||||
listcontains "${PKG_ARCH}" "!${TARGET_ARCH}" && return 1
|
listcontains "${PKG_ARCH}" "!${TARGET_ARCH}" && return 1
|
||||||
listcontains "${PKG_ARCH}" "${TARGET_ARCH}" || listcontains "${PKG_ARCH}" "any" || return 1
|
listcontains "${PKG_ARCH}" "${TARGET_ARCH}" || listcontains "${PKG_ARCH}" "any" || return 1
|
||||||
fi
|
fi
|
||||||
@ -103,6 +107,8 @@ verify_addon() {
|
|||||||
if [ -n "${PKG_ADDON_PROJECTS}" ]; then
|
if [ -n "${PKG_ADDON_PROJECTS}" ]; then
|
||||||
[ "${DEVICE}" = "RPi" ] && _DEVICE="RPi1" || _DEVICE="${DEVICE}"
|
[ "${DEVICE}" = "RPi" ] && _DEVICE="RPi1" || _DEVICE="${DEVICE}"
|
||||||
|
|
||||||
|
VERIFY_FAIL="Incompatible project or device: \"${_DEVICE:-${PROJECT}}\" not in [ ${PKG_ADDON_PROJECTS} ]"
|
||||||
|
|
||||||
if listcontains "${PKG_ADDON_PROJECTS}" "!${_DEVICE:-$PROJECT}" ||
|
if listcontains "${PKG_ADDON_PROJECTS}" "!${_DEVICE:-$PROJECT}" ||
|
||||||
listcontains "${PKG_ADDON_PROJECTS}" "!${PROJECT}"; then
|
listcontains "${PKG_ADDON_PROJECTS}" "!${PROJECT}"; then
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user