aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-04-11 21:34:59 +0200
committerThomas Deutschmann <whissi@gentoo.org>2020-04-11 21:43:05 +0200
commit17a3633dfca328edb40d46b692476ca87a14b9a7 (patch)
tree66b673a9487ed4c1d8a621e2ff1227cd9f967143
parentdefaults/initrd.scripts: minor syntax fix in bootstrapCD() (diff)
downloadgenkernel-17a3633dfca328edb40d46b692476ca87a14b9a7.tar.gz
genkernel-17a3633dfca328edb40d46b692476ca87a14b9a7.tar.bz2
genkernel-17a3633dfca328edb40d46b692476ca87a14b9a7.zip
Makefile: run shellcheck against initramfs' scripts
This should help us catching fatal errors like bug 717102 before release. Bug: https://bugs.gentoo.org/717102 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
-rw-r--r--Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index a3efcd2..e423ab0 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,7 @@ else
@true
endif
-dist: verify-doc check-git-repository distclean $(EXTRA_DIST)
+dist: verify-shellscripts-initramfs verify-doc check-git-repository distclean $(EXTRA_DIST)
mkdir "$(distdir)"
git ls-files -z | xargs -0 cp --no-dereference --parents --target-directory="$(distdir)" \
$(EXTRA_DIST)
@@ -89,3 +89,13 @@ verify-doc: doc/genkernel.8.txt
exit 1 ; \
fi ; \
rm -f faildoc
+
+verify-shellscripts-initramfs:
+# we need to check every file because a fatal error in
+# an included file (SC1094) is just a warning at the moment
+ shellcheck \
+ --external-sources \
+ --source-path SCRIPTDIR \
+ --severity error \
+ defaults/linuxrc \
+ defaults/initrd.scripts