From be2856fc2280014d331d33a520cb5f3f3d909611 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Tue, 24 Oct 2023 12:37:47 +0200 Subject: [PATCH] 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 --- tools/check-tree.sh | 1 + 1 file changed, 1 insertion(+) 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 ############################################################################## -- 2.47.2