mirror of
https://github.com/speed47/spectre-meltdown-checker
synced 2024-12-22 20:33:56 +01:00
chore: Comply with Shellcheck SC2209 (#280)
This commit is contained in:
parent
bfa4de96e6
commit
8ad10e15d3
@ -158,10 +158,10 @@ supported_cve_list='CVE-2017-5753 CVE-2017-5715 CVE-2017-5754 CVE-2018-3640 CVE-
|
|||||||
# find a sane command to print colored messages, we prefer `printf` over `echo`
|
# find a sane command to print colored messages, we prefer `printf` over `echo`
|
||||||
# because `printf` behavior is more standard across Linux/BSD
|
# because `printf` behavior is more standard across Linux/BSD
|
||||||
# we'll try to avoid using shell builtins that might not take options
|
# we'll try to avoid using shell builtins that might not take options
|
||||||
echo_cmd_type=echo
|
echo_cmd_type='echo'
|
||||||
if which printf >/dev/null 2>&1; then
|
if which printf >/dev/null 2>&1; then
|
||||||
echo_cmd=$(which printf)
|
echo_cmd=$(which printf)
|
||||||
echo_cmd_type=printf
|
echo_cmd_type='printf'
|
||||||
elif which echo >/dev/null 2>&1; then
|
elif which echo >/dev/null 2>&1; then
|
||||||
echo_cmd=$(which echo)
|
echo_cmd=$(which echo)
|
||||||
else
|
else
|
||||||
@ -171,7 +171,7 @@ else
|
|||||||
[ -x /system/bin/echo ] && echo_cmd=/system/bin/echo
|
[ -x /system/bin/echo ] && echo_cmd=/system/bin/echo
|
||||||
fi
|
fi
|
||||||
# still empty? fallback to builtin
|
# still empty? fallback to builtin
|
||||||
[ -z "$echo_cmd" ] && echo_cmd=echo
|
[ -z "$echo_cmd" ] && echo_cmd='echo'
|
||||||
__echo()
|
__echo()
|
||||||
{
|
{
|
||||||
opt="$1"
|
opt="$1"
|
||||||
|
Loading…
Reference in New Issue
Block a user