diff options
author | Vic Liu <vic.liu@canonical.com> | 2020-11-24 11:51:45 +0800 |
---|---|---|
committer | Vic Liu <vic.liu@canonical.com> | 2020-12-03 15:25:57 +0800 |
commit | 0c40bef41322e77fbef365270f9bfc3dcf2a1d94 (patch) | |
tree | 33d94e5258d431dc3b64448ba8c540f6dd2195bb /bin | |
parent | 22dda6a1fa8d68d0466b5cfc87b96e0c5ed36180 (diff) |
audio/jobs: Use a new audio/detect_sinks_sources as depends job to audio/alsa_record_playback_automated
Fixed audio/alsa_record_playback_automated always returns passed result even when there's no valid PulseAudio element.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pactl_list.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/bin/pactl_list.sh b/bin/pactl_list.sh new file mode 100755 index 0000000..a7abb87 --- /dev/null +++ b/bin/pactl_list.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +EXIT_CODE=0 + +for device in "sources" "sinks" +do + if ! pactl list $device short | grep -v -E "monitor|auto_null" + then + echo "No available $device found" + case $device in + "sources") + EXIT_CODE=$(( EXIT_CODE+1 )) + ;; + "sinks") + EXIT_CODE=$(( EXIT_CODE+2 )) + esac + fi +done + +exit $EXIT_CODE \ No newline at end of file |