From ed5c009b449395effaa66df3db945b1b3e499aad Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Tue, 4 Jul 2023 11:45:00 -0400 Subject: [PATCH] Adjust shell scripts to allow Bash in other locations Linux-based OS for the most part provide Bash and being located in /bin, but on other OS's the shell would be in another location. Utilize env(1) and allow it to be located elsewhere. [ Reimplementation of upstream patch from Brad Smith . ] Signed-off-by: Mathieu Desnoyers Change-Id: I99c2b4d0dbf6ab5e6f06a8d1fb0646aa69c639f5 --- extras/abi/dump_abi.sh | 2 +- tests/benchmark/run-urcu-tests.sh | 2 +- tests/benchmark/runhash.sh | 2 +- tests/benchmark/runtests-batch.sh | 2 +- tests/benchmark/runtests.sh | 2 +- tests/utils/tap.sh | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/extras/abi/dump_abi.sh b/extras/abi/dump_abi.sh index e8aedcb..ac58173 100755 --- a/extras/abi/dump_abi.sh +++ b/extras/abi/dump_abi.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # SPDX-License-Identifier: GPL-2.0-only set -eu diff --git a/tests/benchmark/run-urcu-tests.sh b/tests/benchmark/run-urcu-tests.sh index 751514a..4ef9eda 100755 --- a/tests/benchmark/run-urcu-tests.sh +++ b/tests/benchmark/run-urcu-tests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash #first parameter: seconds per test DURATION=$1 diff --git a/tests/benchmark/runhash.sh b/tests/benchmark/runhash.sh index 4f693d1..7d7e3dd 100755 --- a/tests/benchmark/runhash.sh +++ b/tests/benchmark/runhash.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # 1st parameter: seconds per test DURATION=$1 diff --git a/tests/benchmark/runtests-batch.sh b/tests/benchmark/runtests-batch.sh index f030de6..bdb4832 100755 --- a/tests/benchmark/runtests-batch.sh +++ b/tests/benchmark/runtests-batch.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . ../utils/tap.sh . ./common.sh diff --git a/tests/benchmark/runtests.sh b/tests/benchmark/runtests.sh index dd5d662..bec16c1 100755 --- a/tests/benchmark/runtests.sh +++ b/tests/benchmark/runtests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . ../utils/tap.sh . ./common.sh diff --git a/tests/utils/tap.sh b/tests/utils/tap.sh index 24ac1aa..04e4084 100755 --- a/tests/utils/tap.sh +++ b/tests/utils/tap.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Copyright 2010 Patrick LeBoutillier # @@ -65,7 +65,7 @@ OTHER: diag MSG EXAMPLE: - #!/bin/bash + #!/usr/bin/env bash . tap-functions -- 2.34.1