download: make it pass shellcheck
Without that fix, running 'shellcheck -x build' produces the following errors/warnings: In download line 26: [ "x${DEBUG+set}" = 'xset' ] && set -v ^-------------^ SC2268 (style): Avoid x-prefix in comparisons as it no longer serves a purpose. In download line 37: [ "x${NODELETE+set}" = 'xset' ] && deleteblobs="false" ^----------------^ SC2268 (style): Avoid x-prefix in comparisons as it no longer serves a purpose. In download line 102: NODELETE= "${script}" ^-- SC1007 (warning): Remove space after = if trying to assign a value (for empty string, use var='' ... ). In download line 117: NODELETE= resources/packages/"${package}"/download ^-- SC1007 (warning): Remove space after = if trying to assign a value (for empty string, use var='' ... ). In download line 123: NODELETE= resources/packages/"${package}"/download $@ ^-- SC1007 (warning): Remove space after = if trying to assign a value (for empty string, use var='' ... ). ^-- SC2068 (error): Double quote array expansions to avoid re-splitting elements. In download line 125: resources/packages/"${package}"/download $@ ^-- SC2068 (error): Double quote array expansions to avoid re-splitting elements. In download line 131: ./.gitcheck clean ^---------------^ SC2317 (info): Command appears to be unreachable. Check usage (or ignore if invoked indirectly). Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
This commit is contained in:
parent
2a5e494ac9
commit
68cb3ac110
20
download
20
download
|
@ -21,9 +21,10 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# shellcheck source=.gitcheck
|
||||||
./.gitcheck
|
./.gitcheck
|
||||||
|
|
||||||
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
[ "${DEBUG+set}" = 'set' ] && set -v
|
||||||
set -u -e
|
set -u -e
|
||||||
|
|
||||||
./resources/scripts/misc/versioncheck
|
./resources/scripts/misc/versioncheck
|
||||||
|
@ -32,9 +33,9 @@ set -u -e
|
||||||
|
|
||||||
# set this when you want to modify each coreboot tree
|
# set this when you want to modify each coreboot tree
|
||||||
# for example, you want to test custom patches
|
# for example, you want to test custom patches
|
||||||
# NODELETE= ./download coreboot
|
# NODELETE='' ./download coreboot
|
||||||
deleteblobs="true"
|
deleteblobs="true"
|
||||||
[ "x${NODELETE+set}" = 'xset' ] && deleteblobs="false"
|
[ "${NODELETE+set}" = 'set' ] && deleteblobs="false"
|
||||||
|
|
||||||
rm -f "build_error"
|
rm -f "build_error"
|
||||||
|
|
||||||
|
@ -99,7 +100,7 @@ shift 1
|
||||||
if [ "${package}" = "all" ]; then
|
if [ "${package}" = "all" ]; then
|
||||||
for script in resources/packages/*/download; do
|
for script in resources/packages/*/download; do
|
||||||
if [ "${deleteblobs}" = "false" ]; then
|
if [ "${deleteblobs}" = "false" ]; then
|
||||||
NODELETE= "${script}"
|
NODELETE='' "${script}"
|
||||||
else
|
else
|
||||||
"${script}"
|
"${script}"
|
||||||
fi
|
fi
|
||||||
|
@ -114,18 +115,21 @@ fi
|
||||||
|
|
||||||
if [ $# -lt 1 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
if [ "${deleteblobs}" = "false" ]; then
|
if [ "${deleteblobs}" = "false" ]; then
|
||||||
NODELETE= resources/packages/"${package}"/download
|
NODELETE='' resources/packages/"${package}"/download
|
||||||
else
|
else
|
||||||
resources/packages/"${package}"/download
|
resources/packages/"${package}"/download
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ "${deleteblobs}" = "false" ]; then
|
if [ "${deleteblobs}" = "false" ]; then
|
||||||
NODELETE= resources/packages/"${package}"/download $@
|
# shellcheck disable=SC2068
|
||||||
|
NODELETE='' resources/packages/"${package}"/download $@
|
||||||
else
|
else
|
||||||
|
# shellcheck disable=SC2068
|
||||||
resources/packages/"${package}"/download $@
|
resources/packages/"${package}"/download $@
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
# shellcheck disable=SC2317
|
||||||
|
|
||||||
./.gitcheck clean
|
./.gitcheck clean
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
|
@ -42,6 +42,7 @@ printf "| Running lint tests: |\n"
|
||||||
printf "+---------------------+\n"
|
printf "+---------------------+\n"
|
||||||
run_shellcheck \
|
run_shellcheck \
|
||||||
build \
|
build \
|
||||||
|
download \
|
||||||
modify \
|
modify \
|
||||||
resources/packages/descriptors/distclean \
|
resources/packages/descriptors/distclean \
|
||||||
resources/packages/flashrom/distclean \
|
resources/packages/flashrom/distclean \
|
||||||
|
|
Loading…
Reference in New Issue