From: Florian Westphal Date: Tue, 24 Oct 2023 10:37:47 +0000 (+0200) Subject: check-tree.sh: check and flag /bin/sh usage X-Git-Tag: v1.1.0~259 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be2856fc2280014d331d33a520cb5f3f3d909611;p=thirdparty%2Fnftables.git check-tree.sh: check and flag /bin/sh usage Almost all shell tests use /bin/bash already. In some cases we've had shell tests use /bin/sh, but still having a bashism. This causes failures on systems where sh is dash or another, strict bourne shell. Flag those via check-tree.sh. Signed-off-by: Florian Westphal --- diff --git a/tools/check-tree.sh b/tools/check-tree.sh index c3aaa08d..e3ddf8bd 100755 --- a/tools/check-tree.sh +++ b/tools/check-tree.sh @@ -68,6 +68,7 @@ if [ "${#SHELL_TESTS[@]}" -eq 0 ] ; then fi for t in "${SHELL_TESTS[@]}" ; do check_shell_dumps "$t" + head -n 1 "$t" |grep -q '^#!/bin/sh' && echo "$t uses sh instead of bash" && EXIT_CODE=1 done ##############################################################################