index : archiso32 | |
Archlinux32 iso tools | gitolite user |
summaryrefslogtreecommitdiff |
author | David Runge <dvzrv@archlinux.org> | 2020-10-29 14:51:55 +0100 |
---|---|---|
committer | David Runge <dvzrv@archlinux.org> | 2020-10-29 15:48:51 +0100 |
commit | 8bb3e8c12f08c841e3ac13fc0e56568b253df751 (patch) | |
tree | 5a8df0758dc331f339dd80880f2e423383c0a478 /configs/releng/airootfs/usr/local | |
parent | 6a39300b0f0a08574038bad4537a27bb614a841d (diff) |
-rwxr-xr-x | configs/releng/airootfs/usr/local/bin/livecd-sound | 10 |
diff --git a/configs/releng/airootfs/usr/local/bin/livecd-sound b/configs/releng/airootfs/usr/local/bin/livecd-sound index 87d6f30..baae0d2 100755 --- a/configs/releng/airootfs/usr/local/bin/livecd-sound +++ b/configs/releng/airootfs/usr/local/bin/livecd-sound @@ -136,7 +136,7 @@ sanify_levels_on_card() # $1 <card ID> | "all" sanify_levels() { - local ttsdml_returnstatus=0 + local ttsdml_returnstatus=0 local card case "$1" in all) @@ -171,13 +171,9 @@ unmute_all_cards() sanify_levels all } -nwords() { - echo $# -} - is_numeric() { local str=$1 - expr match "$str" '[[:digit:]]\+$' > /dev/null 2>&1 + [[ "$str" =~ ^[0-9]+$ ]] } set_default_card() { @@ -197,7 +193,7 @@ pick_a_card() { set -f usable_cards="$(list_non_pcsp_cards)" - num_usable_cards=$(nwords $usable_cards) + num_usable_cards="$(wc -w <<< "$usable_cards")" if [ "$num_usable_cards" -eq 1 ]; then systemd-cat -t "livecdsound" printf "Only one sound card is detected\n" |