build: make it pass shellcheck
Without that fix, running 'shellcheck -x build' produces the following errors/warnings: In build line 25: [ "x${DEBUG+set}" = 'xset' ] && set -v ^-------------^ SC2268 (style): Avoid x-prefix in comparisons as it no longer serves a purpose. In build line 131: resources/packages/"${package}"/"${task}" $@ ^-- SC2068 (error): Double quote array expansions to avoid re-splitting elements. In build line 138: "${pkg_dir}"/"${task}" $@ ^-- SC2068 (error): Double quote array expansions to avoid re-splitting elements. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
This commit is contained in:
parent
de1d84340d
commit
e0159d22f4
4
build
4
build
|
@ -22,7 +22,7 @@
|
||||||
#
|
#
|
||||||
./.gitcheck
|
./.gitcheck
|
||||||
|
|
||||||
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
[ "${DEBUG+set}" = 'set' ] && set -v
|
||||||
set -u -e
|
set -u -e
|
||||||
|
|
||||||
projectname="$(cat projectname)"
|
projectname="$(cat projectname)"
|
||||||
|
@ -127,6 +127,7 @@ if [ $# -gt 1 ]; then
|
||||||
;;
|
;;
|
||||||
all)
|
all)
|
||||||
for package in $(list_packages "${task}"); do
|
for package in $(list_packages "${task}"); do
|
||||||
|
# shellcheck disable=SC2068
|
||||||
resources/packages/"${package}"/"${task}" $@
|
resources/packages/"${package}"/"${task}" $@
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
|
@ -134,6 +135,7 @@ if [ $# -gt 1 ]; then
|
||||||
if [ -d resources/packages/"${package}" ] ; then
|
if [ -d resources/packages/"${package}" ] ; then
|
||||||
pkg_dir=resources/packages/"${package}"
|
pkg_dir=resources/packages/"${package}"
|
||||||
if [ -f "${pkg_dir}"/"${task}" ]; then
|
if [ -f "${pkg_dir}"/"${task}" ]; then
|
||||||
|
# shellcheck disable=SC2068
|
||||||
"${pkg_dir}"/"${task}" $@
|
"${pkg_dir}"/"${task}" $@
|
||||||
else
|
else
|
||||||
help
|
help
|
||||||
|
|
|
@ -41,6 +41,7 @@ printf "+---------------------+\n"
|
||||||
printf "| Running lint tests: |\n"
|
printf "| Running lint tests: |\n"
|
||||||
printf "+---------------------+\n"
|
printf "+---------------------+\n"
|
||||||
run_shellcheck \
|
run_shellcheck \
|
||||||
|
build \
|
||||||
resources/packages/descriptors/distclean \
|
resources/packages/descriptors/distclean \
|
||||||
resources/packages/flashrom/distclean \
|
resources/packages/flashrom/distclean \
|
||||||
resources/packages/grub/distclean \
|
resources/packages/grub/distclean \
|
||||||
|
|
Loading…
Reference in New Issue