modify: make it pass shellcheck
Without that fix, running 'shellcheck -x build' produces the following errors/warnings: In modify line 23: [ "x${DEBUG+set}" = 'xset' ] && set -v ^-------------^ SC2268 (style): Avoid x-prefix in comparisons as it no longer serves a purpose. In modify line 106: resources/packages/"${package}"/modify/"${option}" $@ ^-- SC2068 (error): Double quote array expansions to avoid re-splitting elements. In modify line 113: "${pkg_dir}"/modify/"${option}" $@ ^-- 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
e0159d22f4
commit
2a5e494ac9
4
modify
4
modify
|
@ -20,7 +20,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
||||
[ "${DEBUG+set}" = 'set' ] && set -v
|
||||
set -u -e
|
||||
|
||||
projectname="$(cat projectname)"
|
||||
|
@ -103,6 +103,7 @@ if [ $# -gt 1 ]; then
|
|||
;;
|
||||
all)
|
||||
for option in $(listoptions "${package}"); do
|
||||
# shellcheck disable=SC2068
|
||||
resources/packages/"${package}"/modify/"${option}" $@
|
||||
done
|
||||
;;
|
||||
|
@ -110,6 +111,7 @@ if [ $# -gt 1 ]; then
|
|||
if [ -d resources/packages/"${package}"/modify ]; then
|
||||
pkg_dir=resources/packages/"${package}"
|
||||
if [ -f "${pkg_dir}"/modify/"${option}" ]; then
|
||||
# shellcheck disable=SC2068
|
||||
"${pkg_dir}"/modify/"${option}" $@
|
||||
else
|
||||
help
|
||||
|
|
|
@ -42,6 +42,7 @@ printf "| Running lint tests: |\n"
|
|||
printf "+---------------------+\n"
|
||||
run_shellcheck \
|
||||
build \
|
||||
modify \
|
||||
resources/packages/descriptors/distclean \
|
||||
resources/packages/flashrom/distclean \
|
||||
resources/packages/grub/distclean \
|
||||
|
|
Loading…
Reference in New Issue