Add function to check whether a board has an analogue jack

This commit is contained in:
Simon Long 2020-10-24 11:35:32 +01:00
parent 08400e3154
commit 5b11405bf8

View File

@ -89,6 +89,14 @@ is_pulseaudio() {
return $?
}
has_analog() {
if [ $(get_leds) -eq -1 ] ; then
return 0
else
return 1
fi
}
is_installed() {
if [ "$(dpkg -l "$1" 2> /dev/null | tail -n 1 | cut -d ' ' -f 1)" != "ii" ]; then
return 1