From 5e2a59dbb8e37e54cc02811f8035de78f241ce23 Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Tue, 20 Jul 2021 12:41:33 +0300 Subject: [PATCH] Pull request: scripts: do not use ls -q Updates #3361. Squashed commit of the following: commit 97c13c506c4215ef55550527c8db425db85a9977 Author: Ainar Garipov Date: Tue Jul 20 12:31:29 2021 +0300 scripts: do not use ls -q --- HACKING.md | 5 ++++- scripts/install.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/HACKING.md b/HACKING.md index 46e89ecf..2b21ad8c 100644 --- a/HACKING.md +++ b/HACKING.md @@ -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. diff --git a/scripts/install.sh b/scripts/install.sh index e715404a..c1b290d2 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -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'