aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2022-07-25 17:18:14 +0200
committerFabian Groffen <grobian@gentoo.org>2022-07-25 17:18:14 +0200
commitb716e3591933300aa3eedff56ab92d54dd17c516 (patch)
tree77719294be99f1de22ede28ce4bb61dac6964aca
parenteapi.sh: Remove dead EAPI 5-hdepend from regex (diff)
downloadportage-b716e3591933300aa3eedff56ab92d54dd17c516.tar.gz
portage-b716e3591933300aa3eedff56ab92d54dd17c516.tar.bz2
portage-b716e3591933300aa3eedff56ab92d54dd17c516.zip
*: use /usr/bin/env bash iso /bin/bash
For Prefix systems it's better not to use host-provided bash (if it exists at all), and this is in line with python usage as well. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rw-r--r--bin/bashrc-functions.sh2
-rwxr-xr-xbin/deprecated-path2
-rw-r--r--bin/eapi.sh2
-rw-r--r--bin/eapi7-ver-funcs.sh2
-rwxr-xr-xbin/ebuild-helpers/bsd/sed2
-rwxr-xr-xbin/ebuild-helpers/die2
-rwxr-xr-xbin/ebuild-helpers/dobin2
-rwxr-xr-xbin/ebuild-helpers/doconfd2
-rwxr-xr-xbin/ebuild-helpers/dodir2
-rwxr-xr-xbin/ebuild-helpers/dodoc2
-rwxr-xr-xbin/ebuild-helpers/doenvd2
-rwxr-xr-xbin/ebuild-helpers/doexe2
-rwxr-xr-xbin/ebuild-helpers/dohard2
-rwxr-xr-xbin/ebuild-helpers/doheader2
-rwxr-xr-xbin/ebuild-helpers/dohtml2
-rwxr-xr-xbin/ebuild-helpers/doinfo2
-rwxr-xr-xbin/ebuild-helpers/doinitd2
-rwxr-xr-xbin/ebuild-helpers/doins2
-rwxr-xr-xbin/ebuild-helpers/dolib2
-rwxr-xr-xbin/ebuild-helpers/dolib.a2
-rwxr-xr-xbin/ebuild-helpers/dolib.so2
-rwxr-xr-xbin/ebuild-helpers/doman2
-rwxr-xr-xbin/ebuild-helpers/domo2
-rwxr-xr-xbin/ebuild-helpers/dosbin2
-rwxr-xr-xbin/ebuild-helpers/dosed2
-rwxr-xr-xbin/ebuild-helpers/dosym2
-rwxr-xr-xbin/ebuild-helpers/elog2
-rwxr-xr-xbin/ebuild-helpers/emake2
-rwxr-xr-xbin/ebuild-helpers/fowners2
-rwxr-xr-xbin/ebuild-helpers/fperms2
-rwxr-xr-xbin/ebuild-helpers/keepdir2
-rwxr-xr-xbin/ebuild-helpers/newins2
-rwxr-xr-xbin/ebuild-helpers/nonfatal2
-rwxr-xr-xbin/ebuild-helpers/portageq2
-rwxr-xr-xbin/ebuild-helpers/prepall2
-rwxr-xr-xbin/ebuild-helpers/prepalldocs2
-rwxr-xr-xbin/ebuild-helpers/prepallinfo2
-rwxr-xr-xbin/ebuild-helpers/prepallman2
-rwxr-xr-xbin/ebuild-helpers/prepallstrip2
-rwxr-xr-xbin/ebuild-helpers/prepinfo2
-rwxr-xr-xbin/ebuild-helpers/prepman2
-rwxr-xr-xbin/ebuild-helpers/prepstrip2
-rwxr-xr-xbin/ebuild-helpers/unprivileged/chown2
-rwxr-xr-xbin/ebuild-helpers/xattr/install2
-rwxr-xr-xbin/ebuild-pyhelper2
-rwxr-xr-xbin/ebuild.sh2
-rwxr-xr-xbin/ecompress2
-rwxr-xr-xbin/ecompress-file2
-rwxr-xr-xbin/emerge-webrsync2
-rwxr-xr-xbin/estrip2
-rwxr-xr-xbin/etc-update2
-rw-r--r--bin/helper-functions.sh2
-rw-r--r--bin/isolated-functions.sh2
-rwxr-xr-xbin/misc-functions.sh2
-rw-r--r--bin/phase-functions.sh2
-rw-r--r--bin/phase-helpers.sh2
-rw-r--r--bin/save-ebuild-env.sh2
-rw-r--r--cnf/repo.postsync.d/example2
-rwxr-xr-xmake.conf.example-repatch.sh2
-rwxr-xr-xmisc/emerge-delta-webrsync2
60 files changed, 60 insertions, 60 deletions
diff --git a/bin/bashrc-functions.sh b/bin/bashrc-functions.sh
index cc025467f..a45587b28 100644
--- a/bin/bashrc-functions.sh
+++ b/bin/bashrc-functions.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/deprecated-path b/bin/deprecated-path
index b8aaadbda..dba39125f 100755
--- a/bin/deprecated-path
+++ b/bin/deprecated-path
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Author:
diff --git a/bin/eapi.sh b/bin/eapi.sh
index 689e09b10..d90c3cd2e 100644
--- a/bin/eapi.sh
+++ b/bin/eapi.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 2012-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/eapi7-ver-funcs.sh b/bin/eapi7-ver-funcs.sh
index b4e98f4e7..fa61b6cce 100644
--- a/bin/eapi7-ver-funcs.sh
+++ b/bin/eapi7-ver-funcs.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/bsd/sed b/bin/ebuild-helpers/bsd/sed
index 8bece09cd..2d7b844da 100755
--- a/bin/ebuild-helpers/bsd/sed
+++ b/bin/ebuild-helpers/bsd/sed
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 2007-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/die b/bin/ebuild-helpers/die
index 5c6b1d2cb..5348acbd3 100755
--- a/bin/ebuild-helpers/die
+++ b/bin/ebuild-helpers/die
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/dobin b/bin/ebuild-helpers/dobin
index 975067fb1..8abcc713c 100755
--- a/bin/ebuild-helpers/dobin
+++ b/bin/ebuild-helpers/dobin
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/doconfd b/bin/ebuild-helpers/doconfd
index 572629a54..761fd7309 100755
--- a/bin/ebuild-helpers/doconfd
+++ b/bin/ebuild-helpers/doconfd
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/dodir b/bin/ebuild-helpers/dodir
index 9b376c73f..4fb113819 100755
--- a/bin/ebuild-helpers/dodir
+++ b/bin/ebuild-helpers/dodir
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/dodoc b/bin/ebuild-helpers/dodoc
index e83091045..af3764b7e 100755
--- a/bin/ebuild-helpers/dodoc
+++ b/bin/ebuild-helpers/dodoc
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/doenvd b/bin/ebuild-helpers/doenvd
index f1310c848..d801646e3 100755
--- a/bin/ebuild-helpers/doenvd
+++ b/bin/ebuild-helpers/doenvd
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/doexe b/bin/ebuild-helpers/doexe
index 152c13bf6..154f5daca 100755
--- a/bin/ebuild-helpers/doexe
+++ b/bin/ebuild-helpers/doexe
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/dohard b/bin/ebuild-helpers/dohard
index 66e2604b0..4ee1ba258 100755
--- a/bin/ebuild-helpers/dohard
+++ b/bin/ebuild-helpers/dohard
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/doheader b/bin/ebuild-helpers/doheader
index 2f21a5a2a..6ca423d6d 100755
--- a/bin/ebuild-helpers/doheader
+++ b/bin/ebuild-helpers/doheader
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/dohtml b/bin/ebuild-helpers/dohtml
index 49d6a6dfb..b6373a36c 100755
--- a/bin/ebuild-helpers/dohtml
+++ b/bin/ebuild-helpers/dohtml
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 2009-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/doinfo b/bin/ebuild-helpers/doinfo
index 30a38e055..cf4d42b1a 100755
--- a/bin/ebuild-helpers/doinfo
+++ b/bin/ebuild-helpers/doinfo
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/doinitd b/bin/ebuild-helpers/doinitd
index 1863aedac..fbb94d1f6 100755
--- a/bin/ebuild-helpers/doinitd
+++ b/bin/ebuild-helpers/doinitd
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins
index 24fe48121..6c6be31bb 100755
--- a/bin/ebuild-helpers/doins
+++ b/bin/ebuild-helpers/doins
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/dolib b/bin/ebuild-helpers/dolib
index bd8eebca7..c31442a8e 100755
--- a/bin/ebuild-helpers/dolib
+++ b/bin/ebuild-helpers/dolib
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/dolib.a b/bin/ebuild-helpers/dolib.a
index 5ea126b5d..00fd53804 100755
--- a/bin/ebuild-helpers/dolib.a
+++ b/bin/ebuild-helpers/dolib.a
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/dolib.so b/bin/ebuild-helpers/dolib.so
index a3b579e5e..5e53a85e7 100755
--- a/bin/ebuild-helpers/dolib.so
+++ b/bin/ebuild-helpers/dolib.so
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/doman b/bin/ebuild-helpers/doman
index 9cfc89df0..c2418ce40 100755
--- a/bin/ebuild-helpers/doman
+++ b/bin/ebuild-helpers/doman
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/domo b/bin/ebuild-helpers/domo
index 2e95eb751..474bb7e1d 100755
--- a/bin/ebuild-helpers/domo
+++ b/bin/ebuild-helpers/domo
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/dosbin b/bin/ebuild-helpers/dosbin
index ac0ab37ca..1ff253bb1 100755
--- a/bin/ebuild-helpers/dosbin
+++ b/bin/ebuild-helpers/dosbin
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/dosed b/bin/ebuild-helpers/dosed
index 37c8a29d3..d3c249352 100755
--- a/bin/ebuild-helpers/dosed
+++ b/bin/ebuild-helpers/dosed
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/dosym b/bin/ebuild-helpers/dosym
index 9672ed722..69a4a1ebe 100755
--- a/bin/ebuild-helpers/dosym
+++ b/bin/ebuild-helpers/dosym
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/elog b/bin/ebuild-helpers/elog
index 911f8d57f..e878a3da2 100755
--- a/bin/ebuild-helpers/elog
+++ b/bin/ebuild-helpers/elog
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/emake b/bin/ebuild-helpers/emake
index 60718a2e4..3d8b31eee 100755
--- a/bin/ebuild-helpers/emake
+++ b/bin/ebuild-helpers/emake
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
diff --git a/bin/ebuild-helpers/fowners b/bin/ebuild-helpers/fowners
index 0eda73e58..c6ed36ed3 100755
--- a/bin/ebuild-helpers/fowners
+++ b/bin/ebuild-helpers/fowners
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/fperms b/bin/ebuild-helpers/fperms
index f98560039..9620cc06a 100755
--- a/bin/ebuild-helpers/fperms
+++ b/bin/ebuild-helpers/fperms
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/keepdir b/bin/ebuild-helpers/keepdir
index a3c0c151c..eb969b11b 100755
--- a/bin/ebuild-helpers/keepdir
+++ b/bin/ebuild-helpers/keepdir
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/newins b/bin/ebuild-helpers/newins
index 30e54b7e5..d05d688ac 100755
--- a/bin/ebuild-helpers/newins
+++ b/bin/ebuild-helpers/newins
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/nonfatal b/bin/ebuild-helpers/nonfatal
index 5da07cc71..fd55a431d 100755
--- a/bin/ebuild-helpers/nonfatal
+++ b/bin/ebuild-helpers/nonfatal
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/portageq b/bin/ebuild-helpers/portageq
index d31bd6810..199804f7b 100755
--- a/bin/ebuild-helpers/portageq
+++ b/bin/ebuild-helpers/portageq
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 2009-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/prepall b/bin/ebuild-helpers/prepall
index e23a6d410..6af94db03 100755
--- a/bin/ebuild-helpers/prepall
+++ b/bin/ebuild-helpers/prepall
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/prepalldocs b/bin/ebuild-helpers/prepalldocs
index e23a6d410..6af94db03 100755
--- a/bin/ebuild-helpers/prepalldocs
+++ b/bin/ebuild-helpers/prepalldocs
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/prepallinfo b/bin/ebuild-helpers/prepallinfo
index e23a6d410..6af94db03 100755
--- a/bin/ebuild-helpers/prepallinfo
+++ b/bin/ebuild-helpers/prepallinfo
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/prepallman b/bin/ebuild-helpers/prepallman
index e23a6d410..6af94db03 100755
--- a/bin/ebuild-helpers/prepallman
+++ b/bin/ebuild-helpers/prepallman
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/prepallstrip b/bin/ebuild-helpers/prepallstrip
index 4bde1f4b2..2bf567634 100755
--- a/bin/ebuild-helpers/prepallstrip
+++ b/bin/ebuild-helpers/prepallstrip
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/prepinfo b/bin/ebuild-helpers/prepinfo
index 9d33e6e9a..e771c97aa 100755
--- a/bin/ebuild-helpers/prepinfo
+++ b/bin/ebuild-helpers/prepinfo
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/prepman b/bin/ebuild-helpers/prepman
index 4c6d47bb2..871fd589b 100755
--- a/bin/ebuild-helpers/prepman
+++ b/bin/ebuild-helpers/prepman
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/prepstrip b/bin/ebuild-helpers/prepstrip
index ecbea47ec..9b523517c 100755
--- a/bin/ebuild-helpers/prepstrip
+++ b/bin/ebuild-helpers/prepstrip
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/unprivileged/chown b/bin/ebuild-helpers/unprivileged/chown
index a7a4ff447..572664324 100755
--- a/bin/ebuild-helpers/unprivileged/chown
+++ b/bin/ebuild-helpers/unprivileged/chown
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 2012-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-helpers/xattr/install b/bin/ebuild-helpers/xattr/install
index e5bb10895..ebc68645e 100755
--- a/bin/ebuild-helpers/xattr/install
+++ b/bin/ebuild-helpers/xattr/install
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 2013-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild-pyhelper b/bin/ebuild-pyhelper
index d32bc6f6f..3c77a0304 100755
--- a/bin/ebuild-pyhelper
+++ b/bin/ebuild-pyhelper
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 2010-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index dbadd7919..6bb5d45b7 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ecompress b/bin/ecompress
index 7991bcfbe..30d7888cd 100755
--- a/bin/ecompress
+++ b/bin/ecompress
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/ecompress-file b/bin/ecompress-file
index ccc2701c3..1943ca102 100755
--- a/bin/ecompress-file
+++ b/bin/ecompress-file
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index db39b272e..811bfccb7 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Author: Karl Trygve Kalleberg <karltk@gentoo.org>
diff --git a/bin/estrip b/bin/estrip
index 1e3f21e73..fc2c3ef37 100755
--- a/bin/estrip
+++ b/bin/estrip
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/etc-update b/bin/etc-update
index 7897d9b16..148a0f05a 100755
--- a/bin/etc-update
+++ b/bin/etc-update
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/helper-functions.sh b/bin/helper-functions.sh
index f76703f0c..a7f99197a 100644
--- a/bin/helper-functions.sh
+++ b/bin/helper-functions.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 55c38fbb0..2ec677c69 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index 41340e3f7..c8bac08e7 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
#
diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index 84a5c1ec3..ccf7eeea7 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 64c168627..481170ebb 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh
index 17e4b1b3e..18a82ad4c 100644
--- a/bin/save-ebuild-env.sh
+++ b/bin/save-ebuild-env.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
diff --git a/cnf/repo.postsync.d/example b/cnf/repo.postsync.d/example
index 72d91a60e..a1ec98022 100644
--- a/cnf/repo.postsync.d/example
+++ b/cnf/repo.postsync.d/example
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Example /etc/portage/repo.postsync.d script. Make it executable (chmod +x) for
# Portage to process it.
#
diff --git a/make.conf.example-repatch.sh b/make.conf.example-repatch.sh
index c97c6f20f..5aae91718 100755
--- a/make.conf.example-repatch.sh
+++ b/make.conf.example-repatch.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
die() {
echo "ERROR: $*" > /dev/stderr
diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync
index 082e15e52..d4c70fb9c 100755
--- a/misc/emerge-delta-webrsync
+++ b/misc/emerge-delta-webrsync
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Author: Brian Harring <ferringb@gentoo.org>, karltk@gentoo.org originally.