From a4cc26497e7e1ca2670e6dada21d4416bd1db311 Mon Sep 17 00:00:00 2001 From: Curtis Doty Date: Fri, 5 Apr 2024 02:18:59 +0000 Subject: [PATCH] Your bash is not my bash Let's respect the environment. If a developer is running their own version of the shell, respect it. Don't hard-code. --- scripts/activate.sh | 3 +-- scripts/build | 2 +- scripts/build-deps | 2 +- scripts/test | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/activate.sh b/scripts/activate.sh index 21eb76488..6d0c2067e 100755 --- a/scripts/activate.sh +++ b/scripts/activate.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#! /usr/bin/env bash # Make sure this is sourced. if [[ "$0" == "${BASH_SOURCE[0]}" ]]; then @@ -65,7 +65,6 @@ print("{}{}.{}".format(platform.python_implementation().lower(), *sys.version_in fi - # Just a flag so that we know this was supposedly run. export _PYAV_ACTIVATED=1 diff --git a/scripts/build b/scripts/build index 8d7e3b06e..544600bd9 100755 --- a/scripts/build +++ b/scripts/build @@ -1,4 +1,4 @@ -#!/bin/bash +#! /usr/bin/env bash if [[ ! "$_PYAV_ACTIVATED" ]]; then export here="$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd)" diff --git a/scripts/build-deps b/scripts/build-deps index 33c64727e..07eac76bd 100755 --- a/scripts/build-deps +++ b/scripts/build-deps @@ -1,4 +1,4 @@ -#!/bin/bash +#! /usr/bin/env bash if [[ ! "$_PYAV_ACTIVATED" ]]; then export here="$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd)" diff --git a/scripts/test b/scripts/test index 01991f5a6..cdec37303 100755 --- a/scripts/test +++ b/scripts/test @@ -1,4 +1,4 @@ -#!/bin/bash +#! /usr/bin/env bash # Exit as soon as something errors. set -e