mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
support/br2-external: fix remaining shellcheck errors
Boring changes: either do what shellcheck suggested, or comment why we
don't want to fix the code.
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
(cherry picked from commit 72e068001b)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
committed by
Thomas Perale
parent
c90d46d83a
commit
cecf369586
@@ -1244,7 +1244,6 @@ support/libtool/buildroot-libtool-v2.4.4.patch lib_patch.ApplyOrder lib_patch.Up
|
||||
support/libtool/buildroot-libtool-v2.4.patch lib_patch.ApplyOrder lib_patch.Sob lib_patch.Upstream
|
||||
support/misc/relocate-sdk.sh Shellcheck
|
||||
support/scripts/apply-patches.sh Shellcheck
|
||||
support/scripts/br2-external Shellcheck
|
||||
support/scripts/check-bin-arch Shellcheck
|
||||
support/scripts/check-host-rpath Shellcheck
|
||||
support/scripts/expunge-gconv-modules Shellcheck
|
||||
|
||||
@@ -34,6 +34,7 @@ main() {
|
||||
error "Cannot create output directory '%s'\n" "${outputdir}"
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC2068 # We do want to split on spaces
|
||||
do_validate "${outputdir}" ${@//:/ }
|
||||
do_mk "${outputdir}"
|
||||
do_kconfig "${outputdir}"
|
||||
@@ -71,7 +72,7 @@ do_validate_one() {
|
||||
if [ ! -d "${br2_ext}" ]; then
|
||||
error "'%s': no such file or directory\n" "${br2_ext}"
|
||||
fi
|
||||
if [ ! -r "${br2_ext}" -o ! -x "${br2_ext}" ]; then
|
||||
if [ ! -r "${br2_ext}" ] || [ ! -x "${br2_ext}" ]; then
|
||||
error "'%s': permission denied\n" "${br2_ext}"
|
||||
fi
|
||||
if [ ! -f "${br2_ext}/external.desc" ]; then
|
||||
@@ -106,9 +107,9 @@ do_validate_one() {
|
||||
br2_ext="$( cd "${br2_ext}"; pwd )"
|
||||
br2_ver="$( support/scripts/setlocalversion "${br2_ext}" )"
|
||||
BR2_EXT_NAMES+=( "${br2_name}" )
|
||||
eval BR2_EXT_PATHS_${br2_name}="\"\${br2_ext}\""
|
||||
eval BR2_EXT_VERS_${br2_name}="\"\${br2_ver}\""
|
||||
eval BR2_EXT_DESCS_${br2_name}="\"\${br2_desc:-\${br2_name}}\""
|
||||
eval "BR2_EXT_PATHS_${br2_name}=\"\${br2_ext}\""
|
||||
eval "BR2_EXT_VERS_${br2_name}=\"\${br2_ver}\""
|
||||
eval "BR2_EXT_DESCS_${br2_name}=\"\${br2_desc:-\${br2_name}}\""
|
||||
}
|
||||
|
||||
# Generate the .mk snippet that defines makefile variables
|
||||
@@ -272,7 +273,7 @@ do_kconfig() {
|
||||
printf 'endmenu\n' >>"${outputdir}/.br2-external.in.menus"
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2059 # fmt *is* a format
|
||||
error() { local fmt="${1}"; shift; printf "BR2_EXTERNAL_ERROR = ${fmt}" "${@}"; exit 1; }
|
||||
|
||||
my_name="${0##*/}"
|
||||
main "${@}"
|
||||
|
||||
Reference in New Issue
Block a user