From 09e3eb41187fc00dd89235abe33d702b3fe1ccd7 Mon Sep 17 00:00:00 2001 From: christomel <218936083+christomel@users.noreply.github.com> Date: Thu, 7 Aug 2025 19:11:00 +0200 Subject: [PATCH] scripts: make bash scripts more cross-platform Before this change scripts wrongly assume that `bash` resides at `/bin/bash`. This is not always the case and in fact is not mandated by POSIX. One example of a UNIX OS which does not have bash in `/bin/bash` is NixOS. A workaround for this is to use `/usr/bin/env bash`, which is a standard way to get bash from user environment and works on a wider range of systems than `/bin/bash` Therefore, this change replaces every `/bin/bash` with `/usr/bin/env bash`. Wherever `/bin/bash` took extra arguments, those arguments were moved out of line, because `env` interprets arguments as part of a program name Signed-off-by: christomel <218936083+christomel@users.noreply.github.com> Reviewed-by: Matias Elo --- doc/implementers-guide/implementers-guide.adoc | 2 +- example/classifier/odp_classifier_run.sh | 2 +- example/cli/odp_cli_run.sh | 2 +- example/ipsec_api/odp_ipsec_api_run_ah_in.sh | 2 +- example/ipsec_api/odp_ipsec_api_run_ah_out.sh | 2 +- example/ipsec_api/odp_ipsec_api_run_ah_tun_in.sh | 2 +- example/ipsec_api/odp_ipsec_api_run_ah_tun_out.sh | 2 +- example/ipsec_api/odp_ipsec_api_run_esp_in.sh | 2 +- example/ipsec_api/odp_ipsec_api_run_esp_out.sh | 2 +- example/ipsec_api/odp_ipsec_api_run_esp_tun_in.sh | 2 +- example/ipsec_api/odp_ipsec_api_run_esp_tun_out.sh | 2 +- example/ipsec_api/odp_ipsec_api_run_live.sh | 2 +- example/ipsec_api/odp_ipsec_api_run_router.sh | 2 +- example/ipsec_api/odp_ipsec_api_run_simple.sh | 2 +- example/ipsec_crypto/odp_ipsec_crypto_run_ah_in.sh | 2 +- example/ipsec_crypto/odp_ipsec_crypto_run_ah_out.sh | 2 +- example/ipsec_crypto/odp_ipsec_crypto_run_both_in.sh | 2 +- example/ipsec_crypto/odp_ipsec_crypto_run_both_out.sh | 2 +- example/ipsec_crypto/odp_ipsec_crypto_run_esp_in.sh | 2 +- example/ipsec_crypto/odp_ipsec_crypto_run_esp_out.sh | 2 +- example/ipsec_crypto/odp_ipsec_crypto_run_live.sh | 2 +- example/ipsec_crypto/odp_ipsec_crypto_run_router.sh | 2 +- example/ipsec_crypto/odp_ipsec_crypto_run_simple.sh | 2 +- example/l3fwd/odp_l3fwd_run.sh | 2 +- example/packet/packet_dump_run.sh | 2 +- example/packet/pktio_run.sh | 2 +- example/ping/ping_run.sh | 2 +- example/simple_pipeline/simple_pipeline_run.sh | 2 +- example/switch/switch_run.sh | 2 +- platform/linux-generic/example/ml/odp_ml_run_mnist.sh | 2 +- .../linux-generic/example/ml/odp_ml_run_model_explorer.sh | 2 +- platform/linux-generic/example/ml/odp_ml_run_simple_linear.sh | 2 +- platform/linux-generic/test/validation/api/ml/gen_models.sh | 2 +- scripts/check-globals.sh | 3 ++- scripts/ci-checkpatches.sh | 4 +++- scripts/ci/build.sh | 2 +- scripts/ci/build_arm64.sh | 2 +- scripts/ci/build_armhf.sh | 2 +- scripts/ci/build_i386.sh | 2 +- scripts/ci/build_ppc64el.sh | 2 +- scripts/ci/build_riscv64.sh | 2 +- scripts/ci/build_static.sh | 2 +- scripts/ci/build_x86_64.sh | 2 +- scripts/ci/check.sh | 2 +- scripts/ci/check_inline_timer.sh | 2 +- scripts/ci/check_pktio.sh | 2 +- scripts/ci/coverage.sh | 2 +- scripts/ci/coverity.sh | 2 +- scripts/ci/distcheck.sh | 2 +- scripts/ci/out_of_tree.sh | 2 +- scripts/odp_check | 2 +- test/performance/odp_dmafwd_run.sh | 2 +- test/performance/odp_l2fwd_perf_run.sh | 2 +- test/performance/odp_l2fwd_run.sh | 2 +- test/performance/odp_pktio_ordered_run.sh | 2 +- test/performance/odp_timer_accuracy_run.sh | 2 +- 56 files changed, 59 insertions(+), 56 deletions(-) diff --git a/doc/implementers-guide/implementers-guide.adoc b/doc/implementers-guide/implementers-guide.adoc index 68239476a0c..eb3f8225309 100644 --- a/doc/implementers-guide/implementers-guide.adoc +++ b/doc/implementers-guide/implementers-guide.adoc @@ -387,7 +387,7 @@ Here follows a dummy example of what wrapper-script could be: [source,bash] ---- -#!/bin/bash +#!/usr/bin/env bash # The parameter, $1, is the name of the test executable to run echo "WRAPPER!!!" diff --git a/example/classifier/odp_classifier_run.sh b/example/classifier/odp_classifier_run.sh index ad0c3a76add..d633c6962fa 100755 --- a/example/classifier/odp_classifier_run.sh +++ b/example/classifier/odp_classifier_run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2020 Marvell diff --git a/example/cli/odp_cli_run.sh b/example/cli/odp_cli_run.sh index bb212fffb5c..6005277626e 100755 --- a/example/cli/odp_cli_run.sh +++ b/example/cli/odp_cli_run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2021 Nokia diff --git a/example/ipsec_api/odp_ipsec_api_run_ah_in.sh b/example/ipsec_api/odp_ipsec_api_run_ah_in.sh index 087c52aa34d..a6462a8a1e2 100755 --- a/example/ipsec_api/odp_ipsec_api_run_ah_in.sh +++ b/example/ipsec_api/odp_ipsec_api_run_ah_in.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test input AH # - 2 loop interfaces diff --git a/example/ipsec_api/odp_ipsec_api_run_ah_out.sh b/example/ipsec_api/odp_ipsec_api_run_ah_out.sh index 6acc8628ab8..7874b6448b0 100755 --- a/example/ipsec_api/odp_ipsec_api_run_ah_out.sh +++ b/example/ipsec_api/odp_ipsec_api_run_ah_out.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test output AH # - 2 loop interfaces diff --git a/example/ipsec_api/odp_ipsec_api_run_ah_tun_in.sh b/example/ipsec_api/odp_ipsec_api_run_ah_tun_in.sh index 02fe3df3a48..89f122c0995 100755 --- a/example/ipsec_api/odp_ipsec_api_run_ah_tun_in.sh +++ b/example/ipsec_api/odp_ipsec_api_run_ah_tun_in.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test input AH # - 2 loop interfaces diff --git a/example/ipsec_api/odp_ipsec_api_run_ah_tun_out.sh b/example/ipsec_api/odp_ipsec_api_run_ah_tun_out.sh index 4efb4c23d13..6511b242a85 100755 --- a/example/ipsec_api/odp_ipsec_api_run_ah_tun_out.sh +++ b/example/ipsec_api/odp_ipsec_api_run_ah_tun_out.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test output AH # - 2 loop interfaces diff --git a/example/ipsec_api/odp_ipsec_api_run_esp_in.sh b/example/ipsec_api/odp_ipsec_api_run_esp_in.sh index 1c3414498ef..d87c9c85300 100755 --- a/example/ipsec_api/odp_ipsec_api_run_esp_in.sh +++ b/example/ipsec_api/odp_ipsec_api_run_esp_in.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test input ESP # - 2 loop interfaces diff --git a/example/ipsec_api/odp_ipsec_api_run_esp_out.sh b/example/ipsec_api/odp_ipsec_api_run_esp_out.sh index c9809e8ac68..6bccdedd887 100755 --- a/example/ipsec_api/odp_ipsec_api_run_esp_out.sh +++ b/example/ipsec_api/odp_ipsec_api_run_esp_out.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test output ESP # - 2 loop interfaces diff --git a/example/ipsec_api/odp_ipsec_api_run_esp_tun_in.sh b/example/ipsec_api/odp_ipsec_api_run_esp_tun_in.sh index 3b4f91e4177..e09908708ec 100755 --- a/example/ipsec_api/odp_ipsec_api_run_esp_tun_in.sh +++ b/example/ipsec_api/odp_ipsec_api_run_esp_tun_in.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test input ESP # - 2 loop interfaces diff --git a/example/ipsec_api/odp_ipsec_api_run_esp_tun_out.sh b/example/ipsec_api/odp_ipsec_api_run_esp_tun_out.sh index 2bda78665c9..f1b7389a757 100755 --- a/example/ipsec_api/odp_ipsec_api_run_esp_tun_out.sh +++ b/example/ipsec_api/odp_ipsec_api_run_esp_tun_out.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test output ESP # - 2 loop interfaces diff --git a/example/ipsec_api/odp_ipsec_api_run_live.sh b/example/ipsec_api/odp_ipsec_api_run_live.sh index 9febf2868d9..09963803c8c 100755 --- a/example/ipsec_api/odp_ipsec_api_run_live.sh +++ b/example/ipsec_api/odp_ipsec_api_run_live.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Live router test # - 2 interfaces interfaces diff --git a/example/ipsec_api/odp_ipsec_api_run_router.sh b/example/ipsec_api/odp_ipsec_api_run_router.sh index 198721ea0fa..00dc70505f8 100755 --- a/example/ipsec_api/odp_ipsec_api_run_router.sh +++ b/example/ipsec_api/odp_ipsec_api_run_router.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Live router test # - 2 interfaces interfaces diff --git a/example/ipsec_api/odp_ipsec_api_run_simple.sh b/example/ipsec_api/odp_ipsec_api_run_simple.sh index 2921f978b8a..db080a37793 100755 --- a/example/ipsec_api/odp_ipsec_api_run_simple.sh +++ b/example/ipsec_api/odp_ipsec_api_run_simple.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Simple router test # - 2 loop interfaces diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_ah_in.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_ah_in.sh index 0c8112306df..9d205344f4b 100755 --- a/example/ipsec_crypto/odp_ipsec_crypto_run_ah_in.sh +++ b/example/ipsec_crypto/odp_ipsec_crypto_run_ah_in.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test input AH # - 2 loop interfaces diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_ah_out.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_ah_out.sh index b0bb210f50d..b1788ab52ce 100755 --- a/example/ipsec_crypto/odp_ipsec_crypto_run_ah_out.sh +++ b/example/ipsec_crypto/odp_ipsec_crypto_run_ah_out.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test output AH # - 2 loop interfaces diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_both_in.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_both_in.sh index 4b8c6ab6354..41287873987 100755 --- a/example/ipsec_crypto/odp_ipsec_crypto_run_both_in.sh +++ b/example/ipsec_crypto/odp_ipsec_crypto_run_both_in.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test AH and ESP input # - 2 loop interfaces diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_both_out.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_both_out.sh index 665534d98c3..34e337911c0 100755 --- a/example/ipsec_crypto/odp_ipsec_crypto_run_both_out.sh +++ b/example/ipsec_crypto/odp_ipsec_crypto_run_both_out.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test AH and ESP output # - 2 loop interfaces diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_esp_in.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_esp_in.sh index 6e6ff57699e..cde127573a3 100755 --- a/example/ipsec_crypto/odp_ipsec_crypto_run_esp_in.sh +++ b/example/ipsec_crypto/odp_ipsec_crypto_run_esp_in.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test input ESP # - 2 loop interfaces diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_esp_out.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_esp_out.sh index 2b7107f803e..86f56a8a968 100755 --- a/example/ipsec_crypto/odp_ipsec_crypto_run_esp_out.sh +++ b/example/ipsec_crypto/odp_ipsec_crypto_run_esp_out.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Test output ESP # - 2 loop interfaces diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_live.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_live.sh index 1393c7af3e9..e9fc3a72208 100755 --- a/example/ipsec_crypto/odp_ipsec_crypto_run_live.sh +++ b/example/ipsec_crypto/odp_ipsec_crypto_run_live.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Live router test # - 2 interfaces interfaces diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_router.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_router.sh index 40c353ee08f..8009535cb78 100755 --- a/example/ipsec_crypto/odp_ipsec_crypto_run_router.sh +++ b/example/ipsec_crypto/odp_ipsec_crypto_run_router.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Live router test # - 2 interfaces interfaces diff --git a/example/ipsec_crypto/odp_ipsec_crypto_run_simple.sh b/example/ipsec_crypto/odp_ipsec_crypto_run_simple.sh index 00b176b360c..ffac2aae572 100755 --- a/example/ipsec_crypto/odp_ipsec_crypto_run_simple.sh +++ b/example/ipsec_crypto/odp_ipsec_crypto_run_simple.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Simple router test # - 2 loop interfaces diff --git a/example/l3fwd/odp_l3fwd_run.sh b/example/l3fwd/odp_l3fwd_run.sh index 0b39d5a523b..7c90ef64aef 100755 --- a/example/l3fwd/odp_l3fwd_run.sh +++ b/example/l3fwd/odp_l3fwd_run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2016-2018 Linaro Limited diff --git a/example/packet/packet_dump_run.sh b/example/packet/packet_dump_run.sh index fea5d8b3cfb..bfc3b7606da 100755 --- a/example/packet/packet_dump_run.sh +++ b/example/packet/packet_dump_run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2018 Linaro Limited diff --git a/example/packet/pktio_run.sh b/example/packet/pktio_run.sh index f08c4593662..b51cd523a1d 100755 --- a/example/packet/pktio_run.sh +++ b/example/packet/pktio_run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2016-2018 Linaro Limited diff --git a/example/ping/ping_run.sh b/example/ping/ping_run.sh index 9598db70aa5..724abcd1f4a 100755 --- a/example/ping/ping_run.sh +++ b/example/ping/ping_run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2019 Nokia diff --git a/example/simple_pipeline/simple_pipeline_run.sh b/example/simple_pipeline/simple_pipeline_run.sh index ba66e506e2b..48b74beb6ed 100755 --- a/example/simple_pipeline/simple_pipeline_run.sh +++ b/example/simple_pipeline/simple_pipeline_run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2019 Nokia diff --git a/example/switch/switch_run.sh b/example/switch/switch_run.sh index c01c505ba08..9395f2148e4 100755 --- a/example/switch/switch_run.sh +++ b/example/switch/switch_run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2016-2018 Linaro Limited diff --git a/platform/linux-generic/example/ml/odp_ml_run_mnist.sh b/platform/linux-generic/example/ml/odp_ml_run_mnist.sh index f83d6f60d51..d893c063721 100755 --- a/platform/linux-generic/example/ml/odp_ml_run_mnist.sh +++ b/platform/linux-generic/example/ml/odp_ml_run_mnist.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2023 Nokia diff --git a/platform/linux-generic/example/ml/odp_ml_run_model_explorer.sh b/platform/linux-generic/example/ml/odp_ml_run_model_explorer.sh index 7f9fed5a68a..c908a7e5889 100755 --- a/platform/linux-generic/example/ml/odp_ml_run_model_explorer.sh +++ b/platform/linux-generic/example/ml/odp_ml_run_model_explorer.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2023 Nokia diff --git a/platform/linux-generic/example/ml/odp_ml_run_simple_linear.sh b/platform/linux-generic/example/ml/odp_ml_run_simple_linear.sh index b394b61a80b..9980bd90bf2 100755 --- a/platform/linux-generic/example/ml/odp_ml_run_simple_linear.sh +++ b/platform/linux-generic/example/ml/odp_ml_run_simple_linear.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2023 Nokia diff --git a/platform/linux-generic/test/validation/api/ml/gen_models.sh b/platform/linux-generic/test/validation/api/ml/gen_models.sh index d88f3c43201..218c4b24e29 100755 --- a/platform/linux-generic/test/validation/api/ml/gen_models.sh +++ b/platform/linux-generic/test/validation/api/ml/gen_models.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2023 Nokia diff --git a/scripts/check-globals.sh b/scripts/check-globals.sh index d198c50c87f..7536d252a7b 100755 --- a/scripts/check-globals.sh +++ b/scripts/check-globals.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env bash # # Check that global symbols in a static library conform to a given regex. # Only static library is checked, since libtool -export-symbols-regex @@ -11,6 +11,7 @@ # lib_LTLIBRARIES Library .la file. # CHECK_GLOBALS_REGEX Global symbols matching this regex are accepted. # +set -o errexit tmpfile=$(mktemp) diff --git a/scripts/ci-checkpatches.sh b/scripts/ci-checkpatches.sh index 4ce0773427d..2fccbf7a8a0 100755 --- a/scripts/ci-checkpatches.sh +++ b/scripts/ci-checkpatches.sh @@ -1,4 +1,6 @@ -#!/bin/bash -x +#!/usr/bin/env bash + +set -o xtrace PATCHES=$1 echo "Run checkpatch for ${PATCHES}" diff --git a/scripts/ci/build.sh b/scripts/ci/build.sh index 4a92cfd834c..bb72735f59d 100755 --- a/scripts/ci/build.sh +++ b/scripts/ci/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e cd "$(dirname "$0")"/../.. diff --git a/scripts/ci/build_arm64.sh b/scripts/ci/build_arm64.sh index 4cac830aec7..324aa811f2c 100755 --- a/scripts/ci/build_arm64.sh +++ b/scripts/ci/build_arm64.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e export TARGET_ARCH=aarch64-linux-gnu diff --git a/scripts/ci/build_armhf.sh b/scripts/ci/build_armhf.sh index 4ae0f19b19e..10b4e001ed2 100755 --- a/scripts/ci/build_armhf.sh +++ b/scripts/ci/build_armhf.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e export TARGET_ARCH=arm-linux-gnueabihf diff --git a/scripts/ci/build_i386.sh b/scripts/ci/build_i386.sh index 797dd454d97..11a8b194897 100755 --- a/scripts/ci/build_i386.sh +++ b/scripts/ci/build_i386.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e export TARGET_ARCH=i686-linux-gnu diff --git a/scripts/ci/build_ppc64el.sh b/scripts/ci/build_ppc64el.sh index 93dd36290e6..a0871e0d684 100755 --- a/scripts/ci/build_ppc64el.sh +++ b/scripts/ci/build_ppc64el.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e export TARGET_ARCH=powerpc64le-linux-gnu diff --git a/scripts/ci/build_riscv64.sh b/scripts/ci/build_riscv64.sh index e52505c68ac..b12f764b705 100755 --- a/scripts/ci/build_riscv64.sh +++ b/scripts/ci/build_riscv64.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e export TARGET_ARCH=riscv64-linux-gnu diff --git a/scripts/ci/build_static.sh b/scripts/ci/build_static.sh index 24d8a2d6aa2..4a1e1b9f214 100755 --- a/scripts/ci/build_static.sh +++ b/scripts/ci/build_static.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e CONFIG_OPT="--prefix=/opt/odp ${CONF}" diff --git a/scripts/ci/build_x86_64.sh b/scripts/ci/build_x86_64.sh index 9211bab8879..4bbe9758110 100755 --- a/scripts/ci/build_x86_64.sh +++ b/scripts/ci/build_x86_64.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e if [ "${CC#clang}" != "${CC}" ] ; then diff --git a/scripts/ci/check.sh b/scripts/ci/check.sh index cfb9e4b5586..ebd3ff44173 100755 --- a/scripts/ci/check.sh +++ b/scripts/ci/check.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e echo 1500 | tee /proc/sys/vm/nr_hugepages diff --git a/scripts/ci/check_inline_timer.sh b/scripts/ci/check_inline_timer.sh index 45f1ae062e9..7bd950bac39 100755 --- a/scripts/ci/check_inline_timer.sh +++ b/scripts/ci/check_inline_timer.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e echo 1000 | tee /proc/sys/vm/nr_hugepages diff --git a/scripts/ci/check_pktio.sh b/scripts/ci/check_pktio.sh index 3c6fd8c86d6..61667e07687 100755 --- a/scripts/ci/check_pktio.sh +++ b/scripts/ci/check_pktio.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e echo 1000 | tee /proc/sys/vm/nr_hugepages diff --git a/scripts/ci/coverage.sh b/scripts/ci/coverage.sh index caa3fe8b581..04a1f458ecf 100755 --- a/scripts/ci/coverage.sh +++ b/scripts/ci/coverage.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e if [ "${CC#clang}" != "${CC}" ] ; then diff --git a/scripts/ci/coverity.sh b/scripts/ci/coverity.sh index 7272f8ed1b4..bc4e75f7241 100755 --- a/scripts/ci/coverity.sh +++ b/scripts/ci/coverity.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e cd "$(dirname "$0")"/../.. diff --git a/scripts/ci/distcheck.sh b/scripts/ci/distcheck.sh index 9d45536f472..e83324c9f2d 100755 --- a/scripts/ci/distcheck.sh +++ b/scripts/ci/distcheck.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e if [ "${CC#clang}" != "${CC}" ] ; then diff --git a/scripts/ci/out_of_tree.sh b/scripts/ci/out_of_tree.sh index d39f5543800..8b0efa97edb 100755 --- a/scripts/ci/out_of_tree.sh +++ b/scripts/ci/out_of_tree.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e if [ "${CC#clang}" != "${CC}" ] ; then diff --git a/scripts/odp_check b/scripts/odp_check index 33809dc2aff..eec6efd6b39 100755 --- a/scripts/odp_check +++ b/scripts/odp_check @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This script is a clean up for the ODP project src files. # diff --git a/test/performance/odp_dmafwd_run.sh b/test/performance/odp_dmafwd_run.sh index 38fcc8dc260..4442c18cee8 100755 --- a/test/performance/odp_dmafwd_run.sh +++ b/test/performance/odp_dmafwd_run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2023 Nokia diff --git a/test/performance/odp_l2fwd_perf_run.sh b/test/performance/odp_l2fwd_perf_run.sh index 3f0c9a9b2ec..f6d1a406bd5 100755 --- a/test/performance/odp_l2fwd_perf_run.sh +++ b/test/performance/odp_l2fwd_perf_run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2015-2018 Linaro Limited diff --git a/test/performance/odp_l2fwd_run.sh b/test/performance/odp_l2fwd_run.sh index 50335bc9840..e98d5cb7ee3 100755 --- a/test/performance/odp_l2fwd_run.sh +++ b/test/performance/odp_l2fwd_run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2015-2018 Linaro Limited diff --git a/test/performance/odp_pktio_ordered_run.sh b/test/performance/odp_pktio_ordered_run.sh index 017c9709151..0349077c1c3 100755 --- a/test/performance/odp_pktio_ordered_run.sh +++ b/test/performance/odp_pktio_ordered_run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2016-2018 Linaro Limited diff --git a/test/performance/odp_timer_accuracy_run.sh b/test/performance/odp_timer_accuracy_run.sh index 9d6e423a142..08feede4237 100755 --- a/test/performance/odp_timer_accuracy_run.sh +++ b/test/performance/odp_timer_accuracy_run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2022-2024 Nokia