diff --git a/.github/workflows/build_test.sh b/.github/workflows/build_test.sh index 96f532ab22e..5dc54771bae 100755 --- a/.github/workflows/build_test.sh +++ b/.github/workflows/build_test.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # SPDX-License-Identifier: LGPL-2.1-or-later set -ex diff --git a/.github/workflows/run_mkosi.sh b/.github/workflows/run_mkosi.sh index 5d4798b5b7a..e8803239aa6 100755 --- a/.github/workflows/run_mkosi.sh +++ b/.github/workflows/run_mkosi.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # SPDX-License-Identifier: LGPL-2.1-or-later # shellcheck disable=SC2064 diff --git a/.github/workflows/unit_tests.sh b/.github/workflows/unit_tests.sh index ec7e92a49a7..9c7beb6d19e 100755 --- a/.github/workflows/unit_tests.sh +++ b/.github/workflows/unit_tests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # SPDX-License-Identifier: LGPL-2.1-or-later # shellcheck disable=SC2206 diff --git a/.semaphore/semaphore-runner.sh b/.semaphore/semaphore-runner.sh index 381504fd3b9..d02b449e0eb 100755 --- a/.semaphore/semaphore-runner.sh +++ b/.semaphore/semaphore-runner.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # SPDX-License-Identifier: LGPL-2.1-or-later set -eux diff --git a/coccinelle/run-coccinelle.sh b/coccinelle/run-coccinelle.sh index becb38bf913..3249722863d 100755 --- a/coccinelle/run-coccinelle.sh +++ b/coccinelle/run-coccinelle.sh @@ -1,5 +1,6 @@ -#!/bin/bash -e +#!/usr/bin/env bash # SPDX-License-Identifier: LGPL-2.1-or-later +set -e # Exclude following paths from the Coccinelle transformations EXCLUDED_PATHS=( diff --git a/man/50-xdg-data-dirs.sh b/man/50-xdg-data-dirs.sh index 02216abf6c6..5f042c5511a 100755 --- a/man/50-xdg-data-dirs.sh +++ b/man/50-xdg-data-dirs.sh @@ -1,11 +1,11 @@ -#!/bin/bash +#!/bin/sh # SPDX-License-Identifier: CC0-1.0 # set the default value XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share/:/usr/share}" # add a directory if it exists -if [[ -d /opt/foo/share ]]; then +if [ -d /opt/foo/share ]; then XDG_DATA_DIRS="/opt/foo/share:${XDG_DATA_DIRS}" fi diff --git a/src/basic/check-filesystems.sh b/src/basic/check-filesystems.sh index 026574652e2..696ef610acc 100755 --- a/src/basic/check-filesystems.sh +++ b/src/basic/check-filesystems.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # SPDX-License-Identifier: LGPL-2.1-or-later set -eu set -o pipefail diff --git a/src/rpm/systemd-update-helper.in b/src/rpm/systemd-update-helper.in index 7e007d48065..ab8cdc0ff96 100755 --- a/src/rpm/systemd-update-helper.in +++ b/src/rpm/systemd-update-helper.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # SPDX-License-Identifier: LGPL-2.1-or-later set -eu set -o pipefail diff --git a/tools/check-api-docs.sh b/tools/check-api-docs.sh index 0bf053b5ffb..2e973a088be 100755 --- a/tools/check-api-docs.sh +++ b/tools/check-api-docs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # SPDX-License-Identifier: LGPL-2.1-or-later set -eu set -o pipefail diff --git a/tools/check-help.sh b/tools/check-help.sh index 8e7d236dd90..76ac2926750 100755 --- a/tools/check-help.sh +++ b/tools/check-help.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # SPDX-License-Identifier: LGPL-2.1-or-later set -eu set -o pipefail diff --git a/tools/get-coverity.sh b/tools/get-coverity.sh index 00219bf60fe..b067ed23eba 100755 --- a/tools/get-coverity.sh +++ b/tools/get-coverity.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # SPDX-License-Identifier: LGPL-2.1-or-later # Download and extract coverity tool