Pull request: scripts: do not use ls -q

Updates #3361.

Squashed commit of the following:

commit 97c13c506c4215ef55550527c8db425db85a9977
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Jul 20 12:31:29 2021 +0300

    scripts: do not use ls -q
This commit is contained in:
Ainar Garipov 2021-07-20 12:41:33 +03:00
parent 5292c7c387
commit 5e2a59dbb8
2 changed files with 5 additions and 2 deletions

View File

@ -355,6 +355,9 @@ attributes to make it work in Markdown renderers that strip "id". -->
* Avoid spaces between patterns of the same `case` condition.
* Don't use the option `-q` of the command `ls`. Some systems that use the
Busybox version of `ash` don't support it.
* `export` and `readonly` should be used separately from variable assignment,
because otherwise failures in command substitutions won't stop the script.
That is, do this:
@ -381,7 +384,7 @@ attributes to make it work in Markdown renderers that strip "id". -->
within `${var}`.
* Put utility flags in the ASCII order and **don't** group them together. For
example, `ls -1 -A -q`.
example, `ls -1 -A -l`.
* Script code lines should not be longer than one hundred (**100**) columns.
For comments, see the text section below.

View File

@ -467,7 +467,7 @@ handle_existing() {
return 0
fi
if [ "$( ls -1 -A -q $agh_dir )" != '' ]
if [ "$( ls -1 -A $agh_dir )" != '' ]
then
log 'the existing AdGuard Home installation is detected'