mirror of
https://github.com/ben-grande/qusal.git
synced 2025-05-06 16:25:17 -04:00
fix: avoid echo usage
Echo can interpret operand as an option and checking every variable to be echoed is troublesome while with printf, if the format specifier is present before the operand, printing as string can be enforced.
This commit is contained in:
parent
1b2f1ba941
commit
bdd4c789c1
52 changed files with 318 additions and 270 deletions
|
@ -7,7 +7,8 @@
|
|||
# shellcheck disable=SC2086
|
||||
set -eu
|
||||
|
||||
command -v git >/dev/null || { echo "Missing program: git" >&2; exit 1; }
|
||||
command -v git >/dev/null ||
|
||||
{ printf '%s\n' "Missing program: git" >&2; exit 1; }
|
||||
repo_toplevel="$(git rev-parse --show-toplevel)"
|
||||
test -d "${repo_toplevel}" || exit 1
|
||||
cd "${repo_toplevel}"
|
||||
|
@ -15,7 +16,7 @@ unset repo_toplevel
|
|||
|
||||
for tool in "${@}"; do
|
||||
if ./scripts/requires-program.sh "${tool}" >/dev/null 2>&1; then
|
||||
echo "${tool}"
|
||||
printf '%s\n' "${tool}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue