mirror of
https://github.com/opnsense/core.git
synced 2026-05-28 04:34:51 -04:00
make: align lint-shell with plugins
This commit is contained in:
parent
ddfe5cff24
commit
00e4102d8e
1 changed files with 6 additions and 2 deletions
|
|
@ -24,8 +24,12 @@
|
|||
# SUCH DAMAGE.
|
||||
|
||||
lint-shell:
|
||||
@find ${.CURDIR}/src ${.CURDIR}/Scripts \
|
||||
-name "*.sh" -type f -print0 | xargs -0 -n1 sh -n
|
||||
@for FILE in $$(find ${.CURDIR}/src -name "*.sh" -type f); do \
|
||||
if [ "$$(head $${FILE} | grep -c '^#!\/')" == "0" ]; then \
|
||||
echo "Missing shebang in $${FILE}"; exit 1; \
|
||||
fi; \
|
||||
sh -n "$${FILE}" || exit 1; \
|
||||
done
|
||||
|
||||
lint-xml:
|
||||
@find ${.CURDIR}/src ${.CURDIR}/Scripts \
|
||||
|
|
|
|||
Loading…
Reference in a new issue