mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
config/functions: add listcontains function, and uses it
This commit is contained in:
parent
9928350609
commit
6822da552e
@ -171,6 +171,11 @@ get_pkg_variable() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# return 0 if $2 in space-separated list $1, otherwise return 1
|
||||||
|
listcontains() {
|
||||||
|
[[ ${1} =~ (^|[[:space:]])${2}($|[[:space:]]) ]] && return 0 || return 1
|
||||||
|
}
|
||||||
|
|
||||||
install_binary_addon() {
|
install_binary_addon() {
|
||||||
local addon_name="$1" addon_id="$2" addon_so
|
local addon_name="$1" addon_id="$2" addon_so
|
||||||
|
|
||||||
|
@ -32,8 +32,4 @@ PKG_AUTORECONF="no"
|
|||||||
|
|
||||||
get_graphicdrivers
|
get_graphicdrivers
|
||||||
|
|
||||||
for drv in $GRAPHIC_DRIVERS; do
|
listcontains "$GRAPHIC_DRIVERS" "vmware" && PKG_DEPENDS_TARGET+=" open-vm-tools"
|
||||||
if [ "$drv" = "vmware" ]; then
|
|
||||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET open-vm-tools"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user