summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2023-10-24 12:37:47 +0200
committerFlorian Westphal <fw@strlen.de>2023-10-24 12:47:00 +0200
commitbe2856fc2280014d331d33a520cb5f3f3d909611 (patch)
treeb6e9a854758ddc98ea271dd729886503ae1fb42b /tools
parentd3e941668be1d3922832fd70788fb248fd11f6c7 (diff)
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 <fw@strlen.de>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/check-tree.sh1
1 files changed, 1 insertions, 0 deletions
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
##############################################################################