]> git.ipfire.org Git - thirdparty/nftables.git/commit
tools: check more strictly for bash shebang in "check-tree.sh"
authorThomas Haller <thaller@redhat.com>
Tue, 14 Nov 2023 16:08:30 +0000 (17:08 +0100)
committerFlorian Westphal <fw@strlen.de>
Wed, 15 Nov 2023 12:12:06 +0000 (13:12 +0100)
commit6834658132a65e53e19aa217b12f1d01d93238b4
treea1bb8cac1fafd1206dc13ccf2c4bb4e9a43c391e
parentf9a177eb32fd1dc6ae1d18f224b1cbc7f53c700f
tools: check more strictly for bash shebang in "check-tree.sh"

There is no problem in principle to allow any executable/shebang. However,
it also not clear why we would want to use anything except bash. Unless
we have a good use case, check and reject anything else.

Also not that `./tests/shell/run-tests.sh -x` only works if the shebang
is either exactly "#!/bin/bash" or "#!/bin/bash -e". While it probably
could be made work with other shebangs, the simpler thing is to just use
bash consistently.

Just check that they are all bash scripts. If there ever is a use-case,
we can always adjust this check.

Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
tools/check-tree.sh