mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-10 16:24:17 -09:00
support/download: fix shellcheck errors in svn backend
Bizarrely enough, the unquoted expansion of ${quiet} does not trigger
any warning from shellcheck, so we do not add any exception for it.
${SVN} can contain more than one item, but we don't care about splitting
on spaces when we just print it for debug, so we can just quote it
rather than add an exception.
Signed-off-by: Yann E. MORIN <yann.morin@orange.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
223596c75d
commit
206d08c04a
@@ -1651,7 +1651,6 @@ support/download/go-post-process Shellcheck
|
||||
support/download/hg Shellcheck
|
||||
support/download/scp Shellcheck
|
||||
support/download/sftp Shellcheck
|
||||
support/download/svn Shellcheck
|
||||
support/download/wget Shellcheck
|
||||
support/gnuconfig/update Shellcheck
|
||||
support/libtool/buildroot-libtool-v1.5.patch ApplyOrder Sob Upstream
|
||||
|
||||
@@ -20,6 +20,7 @@ set -e
|
||||
# Environment:
|
||||
# SVN : the svn command to call
|
||||
|
||||
# shellcheck disable=SC1090 # Only provides mk_tar_gz()
|
||||
. "${0%/*}/helpers"
|
||||
|
||||
quiet=
|
||||
@@ -41,12 +42,13 @@ shift $((OPTIND-1)) # Get rid of our options
|
||||
# being expanded a second time (in case there are spaces in them)
|
||||
_svn() {
|
||||
if [ -z "${quiet}" ]; then
|
||||
printf '%s ' ${SVN} "${@}"; printf '\n'
|
||||
printf '%s ' "${SVN}" "${@}"; printf '\n'
|
||||
fi
|
||||
_plain_svn "$@"
|
||||
}
|
||||
# Note: please keep command below aligned with what is printed above
|
||||
_plain_svn() {
|
||||
# shellcheck disable=SC2086 # We want word-splitting for SVN
|
||||
eval ${SVN} "${@}"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user