From 17834e4043176f17dc20fd4e367795177d5341bc Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Wed, 9 Nov 2022 08:53:35 -0500 Subject: [PATCH] Don't hardcode /bin/bash in scripts 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 0969ad7ce96..2ba39fe48b0 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 72ae5f3a4e6..d5736420c35 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 0c45137caf7..499f6e68280 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 90875366c24..12f207d4b0b 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 158cf85708d..96464e789c1 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 bc08dd6774a..cdec2e5e667 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 406022e88d9..a63803bba6d 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 f60806cbba3..5a3dd940ecd 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 b090179aad5..5337d116f6d 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 9f95e87f1af..fb5aec95769 100755 --- a/scripts/package.sh +++ b/scripts/package.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e