From 5b11405bf839083557ec64c263fc79165e01c3cd Mon Sep 17 00:00:00 2001 From: Simon Long Date: Sat, 24 Oct 2020 11:35:32 +0100 Subject: [PATCH] Add function to check whether a board has an analogue jack --- raspi-config | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/raspi-config b/raspi-config index c1c171c..f181e68 100755 --- a/raspi-config +++ b/raspi-config @@ -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