Skip to content

Commit

Permalink
Add function to check whether a board has an analogue jack
Browse files Browse the repository at this point in the history
  • Loading branch information
spl237 committed Oct 24, 2020
1 parent 08400e3 commit 5b11405
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions raspi-config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5b11405

Please sign in to comment.