[Picolibc] [PATCH] Change #!/bin/bash interpreters to #!/usr/bin/env bash
leon at is.currently.online
leon at is.currently.online
Mon Sep 27 09:38:19 PDT 2021
From: Leon Schuermann <leon at is.currently.online>
This change is required to support distributions which do not feature
a bash shell installed under `/bin/bash`, for example NixOS. Hence, in
their current form, scripts specifying this interpreter path cannot be
executed on NixOS and will thus make the compilation process fail. A
common and sensible solution to this issue is to change the
interpreter path to `/usr/bin/env bash`. This will also use the bash
shell of the user's environment, which may be the expected behavior.
Signed-off-by: Leon Schuermann <leon at is.currently.online>
---
make-target | 2 +-
newlib/make-library | 2 +-
newlib/make-target | 2 +-
scripts/duplicate-names | 2 +-
scripts/run-aarch64 | 2 +-
scripts/run-arm | 2 +-
scripts/run-i686 | 2 +-
scripts/run-thumbv7e | 2 +-
scripts/run-thumbv7m | 2 +-
scripts/run-x86_64 | 2 +-
10 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/make-target b/make-target
index b6c42bddb..5f1b0f60b 100755
--- a/make-target
+++ b/make-target
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
ARCH=$1
GCC="$ARCH"-gcc
diff --git a/newlib/make-library b/newlib/make-library
index 2df9df60a..1a1bfc0e1 100755
--- a/newlib/make-library
+++ b/newlib/make-library
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
dir=`basename $PWD`
diff --git a/newlib/make-target b/newlib/make-target
index b6c42bddb..5f1b0f60b 100755
--- a/newlib/make-target
+++ b/newlib/make-target
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
ARCH=$1
GCC="$ARCH"-gcc
diff --git a/scripts/duplicate-names b/scripts/duplicate-names
index 9cb9a3a35..c2c30e2fa 100755
--- a/scripts/duplicate-names
+++ b/scripts/duplicate-names
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
NM="$1"
FILE="$2"
OUTPUT="$3"
diff --git a/scripts/run-aarch64 b/scripts/run-aarch64
index d1ef968d7..4d34b0f3e 100755
--- a/scripts/run-aarch64
+++ b/scripts/run-aarch64
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# SPDX-License-Identifier: BSD-3-Clause
#
diff --git a/scripts/run-arm b/scripts/run-arm
index c84c624cd..90eb17e98 100755
--- a/scripts/run-arm
+++ b/scripts/run-arm
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# SPDX-License-Identifier: BSD-3-Clause
#
diff --git a/scripts/run-i686 b/scripts/run-i686
index 4667acc04..a564b22aa 100755
--- a/scripts/run-i686
+++ b/scripts/run-i686
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# SPDX-License-Identifier: BSD-3-Clause
#
diff --git a/scripts/run-thumbv7e b/scripts/run-thumbv7e
index d1672b338..063471847 100755
--- a/scripts/run-thumbv7e
+++ b/scripts/run-thumbv7e
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# SPDX-License-Identifier: BSD-3-Clause
#
diff --git a/scripts/run-thumbv7m b/scripts/run-thumbv7m
index d8d232d67..8e79964df 100755
--- a/scripts/run-thumbv7m
+++ b/scripts/run-thumbv7m
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# SPDX-License-Identifier: BSD-3-Clause
#
diff --git a/scripts/run-x86_64 b/scripts/run-x86_64
index 972e60213..4542544e0 100755
--- a/scripts/run-x86_64
+++ b/scripts/run-x86_64
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# SPDX-License-Identifier: BSD-3-Clause
#
base-commit: 60c127bee26ac45b80c429df3d9e8e8517274826
--
2.33.0
More information about the Picolibc
mailing list