]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/boot/lua-lint.sh
lualoader: fix lua-lint run
[FreeBSD/FreeBSD.git] / tools / boot / lua-lint.sh
1 #!/bin/sh
2 # $FreeBSD$
3
4 # Run linter on the lua scripts in stand/lua. luacheck, available in ports as
5 # devel/lua-luacheck, must be installed as a dependency of this script.
6
7 die() {
8     echo $*
9     exit 1
10 }
11
12 LUACHECK=$(which luacheck)
13
14 [ ! -z "${LUACHECK}" ] && [ -e "${LUACHECK}" ] || \
15         die "You must have luacheck installed and in your PATH"
16
17 cd $(make -V SRCTOP)/stand
18 ${LUACHECK} . --globals loader --globals lfs --globals io.getchar \
19         --globals io.ischar --globals printc --globals cli_execute \
20         --globals cli_execute_unparsed --globals try_include \
21         --globals pager --std lua53