From 46c005a5d30373b0c409a92f1f0e8e5ad40f0c6d Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 9 Nov 2022 09:58:06 -0500 Subject: [PATCH] Don't hardcode /bin/bash in scripts (#23740) Some operating systems, such as NixOS, don't place binaries in /bin. The appropriate cross-platform method is to use /usr/bin/env. --- release.sh | 2 +- scripts/ci_package.sh | 2 +- scripts/docker-link-repos.sh | 2 +- scripts/docker-package.sh | 2 +- scripts/fetch-develop.deps.sh | 2 +- scripts/get-version-from-git.sh | 2 +- scripts/layered.sh | 2 +- scripts/make-icons.sh | 2 +- scripts/normalize-version.sh | 2 +- scripts/package.sh | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/release.sh b/release.sh index 0969ad7ce9..2ba39fe48b 100755 --- a/release.sh +++ b/release.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Script to perform a release of element-web. diff --git a/scripts/ci_package.sh b/scripts/ci_package.sh index 72ae5f3a4e..d5736420c3 100755 --- a/scripts/ci_package.sh +++ b/scripts/ci_package.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Runs package.sh, passing DIST_VERSION determined by git diff --git a/scripts/docker-link-repos.sh b/scripts/docker-link-repos.sh index 0c45137caf..499f6e6828 100644 --- a/scripts/docker-link-repos.sh +++ b/scripts/docker-link-repos.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/scripts/docker-package.sh b/scripts/docker-package.sh index 90875366c2..12f207d4b0 100755 --- a/scripts/docker-package.sh +++ b/scripts/docker-package.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/scripts/fetch-develop.deps.sh b/scripts/fetch-develop.deps.sh index 158cf85708..96464e789c 100755 --- a/scripts/fetch-develop.deps.sh +++ b/scripts/fetch-develop.deps.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Fetches the js-sdk and matrix-react-sdk dependencies for development # or testing purposes diff --git a/scripts/get-version-from-git.sh b/scripts/get-version-from-git.sh index bc08dd6774..cdec2e5e66 100755 --- a/scripts/get-version-from-git.sh +++ b/scripts/get-version-from-git.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Echoes a version based on the git hashes of the element-web, react-sdk & js-sdk checkouts, for the case where # these dependencies are git checkouts. diff --git a/scripts/layered.sh b/scripts/layered.sh index 406022e88d..a63803bba6 100755 --- a/scripts/layered.sh +++ b/scripts/layered.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -ex diff --git a/scripts/make-icons.sh b/scripts/make-icons.sh index f60806cbba..5a3dd940ec 100755 --- a/scripts/make-icons.sh +++ b/scripts/make-icons.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Converts an svg logo into the various image resources required by # the various platforms deployments. diff --git a/scripts/normalize-version.sh b/scripts/normalize-version.sh index b090179aad..5337d116f6 100755 --- a/scripts/normalize-version.sh +++ b/scripts/normalize-version.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/scripts/package.sh b/scripts/package.sh index 9f95e87f1a..fb5aec9576 100755 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e