]> git.alsa-project.org Git - alsa-utils.git/commit
alsa-info.sh: Update `test` '-a' and '-o' to '&&' and '||'
authorwileyhy <84648683+wileyhy@users.noreply.github.com>
Sat, 29 Apr 2023 02:49:48 +0000 (19:49 -0700)
committerJaroslav Kysela <perex@perex.cz>
Wed, 3 May 2023 14:29:52 +0000 (16:29 +0200)
commit4588b2f8aebb00f94ecd9b6029ddb0de82fd6d94
tree37fade5c5574164c1d750608bea0991620a73302
parent42bba8ac6113710317cf19bafd5da246f72056bf
alsa-info.sh: Update `test` '-a' and '-o' to '&&' and '||'

lines 50, 103: in two compound ['s, replace '-a' with '] && ['
  SC2166 – Prefer `[ p ] && [ q ]` as `[ p -a q ]` is not well defined.
  SC2107 – Instead of `[ a && b ]`, use `[ a ] && [ b ]`.

line 45: in a compound test command, change '-o' to '|| test'
  SC1139 – Use `||` instead of `-o` between test commands.
  SC2109 – Instead of `[ a || b ]`, use `[ a ] || [ b ]`.

 ... https://github.com/koalaman/shellcheck

Fixes: https://github.com/alsa-project/alsa-utils/pull/206
From: wileyhy @ github
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
alsa-info/alsa-info.sh