summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Grunert <sgrunert@suse.com>2020-08-17 09:18:02 +0200
committerSascha Grunert <sgrunert@suse.com>2020-08-17 10:42:23 +0200
commitba9f18e2b87a1dc6b9f7fea304379c4e41aaaa85 (patch)
treea8eacd3359e2ce22a2ded1f7efedc39c045272b5
parent96fb5dc94d88bc4eafe82382bfb26b64c479f76b (diff)
downloadpodman-ba9f18e2b87a1dc6b9f7fea304379c4e41aaaa85.tar.gz
podman-ba9f18e2b87a1dc6b9f7fea304379c4e41aaaa85.tar.bz2
podman-ba9f18e2b87a1dc6b9f7fea304379c4e41aaaa85.zip
Use `bash` binary from env instead of /bin/bash for scripts
It's not possible to run any of the scripts on distributions which do have `bash` not in `/bin`. This is being fixed by using `/usr/bin/env bash` instead. Signed-off-by: Sascha Grunert <sgrunert@suse.com>
-rwxr-xr-xcontrib/build_rpm.sh2
-rw-r--r--contrib/cirrus/add_second_partition.sh2
-rwxr-xr-xcontrib/cirrus/apiv2_test.sh2
-rwxr-xr-xcontrib/cirrus/build_release.sh2
-rwxr-xr-xcontrib/cirrus/build_swagger.sh2
-rwxr-xr-xcontrib/cirrus/build_vm_images.sh2
-rwxr-xr-xcontrib/cirrus/check_image.sh2
-rw-r--r--contrib/cirrus/container_test.sh2
-rwxr-xr-xcontrib/cirrus/integration_test.sh2
-rw-r--r--contrib/cirrus/lib.sh2
-rwxr-xr-xcontrib/cirrus/lib.sh.t2
-rwxr-xr-xcontrib/cirrus/logcollector.sh2
-rwxr-xr-xcontrib/cirrus/networking.sh2
-rwxr-xr-xcontrib/cirrus/notice_branch_failure.sh2
-rwxr-xr-xcontrib/cirrus/ooe.sh2
-rw-r--r--contrib/cirrus/packer/fedora_base-setup.sh2
-rw-r--r--contrib/cirrus/packer/fedora_packaging.sh2
-rw-r--r--contrib/cirrus/packer/fedora_setup.sh2
-rw-r--r--contrib/cirrus/packer/image-builder-image_base-setup.sh2
-rw-r--r--contrib/cirrus/packer/make-user-data.sh2
-rw-r--r--contrib/cirrus/packer/prior-fedora_base-setup.sh2
-rwxr-xr-xcontrib/cirrus/packer/systemd_banish.sh2
-rw-r--r--contrib/cirrus/packer/ubuntu_packaging.sh2
-rw-r--r--contrib/cirrus/packer/ubuntu_setup.sh2
-rw-r--r--contrib/cirrus/packer/xfedora_setup.sh2
-rwxr-xr-xcontrib/cirrus/rootless_test.sh2
-rwxr-xr-xcontrib/cirrus/setup_container_environment.sh2
-rwxr-xr-xcontrib/cirrus/setup_environment.sh2
-rwxr-xr-xcontrib/cirrus/success.sh2
-rwxr-xr-xcontrib/cirrus/system_test.sh2
-rwxr-xr-xcontrib/cirrus/unit_test.sh2
-rwxr-xr-xcontrib/cirrus/update_meta.sh2
-rwxr-xr-xcontrib/cirrus/upload_release_archive.sh2
-rwxr-xr-xcontrib/gate/entrypoint.sh2
-rwxr-xr-xcontrib/imgprune/entrypoint.sh2
-rwxr-xr-xcontrib/imgts/entrypoint.sh2
-rw-r--r--contrib/imgts/lib_entrypoint.sh2
-rwxr-xr-xcontrib/upldrel/entrypoint.sh2
-rwxr-xr-xdocs/remote-docs.sh3
-rwxr-xr-xhack/apparmor_tag.sh2
-rwxr-xr-xhack/btrfs_installed_tag.sh2
-rwxr-xr-xhack/btrfs_tag.sh2
-rwxr-xr-xhack/check_root.sh2
-rwxr-xr-xhack/get_ci_vm.sh2
-rwxr-xr-xhack/get_release_info.sh2
-rwxr-xr-xhack/golangci-lint.sh3
-rwxr-xr-xhack/install_bats.sh2
-rwxr-xr-xhack/install_catatonit.sh3
-rwxr-xr-xhack/install_golangci.sh2
-rwxr-xr-xhack/libdm_tag.sh2
-rwxr-xr-xhack/man-page-checker2
-rwxr-xr-xhack/podman-commands.sh2
-rwxr-xr-xhack/podmanv2-retry2
-rwxr-xr-xhack/selinux_tag.sh2
-rwxr-xr-xhack/tree_status.sh2
-rwxr-xr-xtest/apiv2/test-apiv22
-rw-r--r--test/system/400-unprivileged-access.bats2
-rwxr-xr-xtest/system/helpers.t2
-rwxr-xr-xtest/test_podman_baseline.sh4
-rw-r--r--test/test_podman_build.sh2
-rwxr-xr-xtest/test_podman_pods.sh2
61 files changed, 65 insertions, 62 deletions
diff --git a/contrib/build_rpm.sh b/contrib/build_rpm.sh
index a4f1817b9..6a82b131f 100755
--- a/contrib/build_rpm.sh
+++ b/contrib/build_rpm.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -euxo pipefail
# returned path can vary: /usr/bin/dnf /bin/dnf ...
diff --git a/contrib/cirrus/add_second_partition.sh b/contrib/cirrus/add_second_partition.sh
index 73db192c5..3c2f9f056 100644
--- a/contrib/cirrus/add_second_partition.sh
+++ b/contrib/cirrus/add_second_partition.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# N/B: This script could mega f*!@up your disks if run by mistake.
# it is left without the execute-bit on purpose!
diff --git a/contrib/cirrus/apiv2_test.sh b/contrib/cirrus/apiv2_test.sh
index 546fe8e30..dbee078b6 100755
--- a/contrib/cirrus/apiv2_test.sh
+++ b/contrib/cirrus/apiv2_test.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/contrib/cirrus/build_release.sh b/contrib/cirrus/build_release.sh
index 45634f368..46fe9781f 100755
--- a/contrib/cirrus/build_release.sh
+++ b/contrib/cirrus/build_release.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/contrib/cirrus/build_swagger.sh b/contrib/cirrus/build_swagger.sh
index 0471f0c10..eb9288dcd 100755
--- a/contrib/cirrus/build_swagger.sh
+++ b/contrib/cirrus/build_swagger.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/contrib/cirrus/build_vm_images.sh b/contrib/cirrus/build_vm_images.sh
index 543f83a14..be1c82185 100755
--- a/contrib/cirrus/build_vm_images.sh
+++ b/contrib/cirrus/build_vm_images.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
source $(dirname $0)/lib.sh
diff --git a/contrib/cirrus/check_image.sh b/contrib/cirrus/check_image.sh
index 13172fe1c..04867ca64 100755
--- a/contrib/cirrus/check_image.sh
+++ b/contrib/cirrus/check_image.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -eo pipefail
diff --git a/contrib/cirrus/container_test.sh b/contrib/cirrus/container_test.sh
index b56a12232..8ea66e63c 100644
--- a/contrib/cirrus/container_test.sh
+++ b/contrib/cirrus/container_test.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -xeo pipefail
export GOPATH=/var/tmp/go
diff --git a/contrib/cirrus/integration_test.sh b/contrib/cirrus/integration_test.sh
index c65f5e25f..636d67411 100755
--- a/contrib/cirrus/integration_test.sh
+++ b/contrib/cirrus/integration_test.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh
index 968b2de39..3292e9d14 100644
--- a/contrib/cirrus/lib.sh
+++ b/contrib/cirrus/lib.sh
@@ -376,7 +376,7 @@ install_scl_git() {
echo "Installing SoftwareCollections updated 'git' version."
ooe.sh $SUDO yum -y install rh-git29
cat << "EOF" | $SUDO tee /usr/bin/git
-#!/bin/bash
+#!/usr/bin/env bash
scl enable rh-git29 -- git $@
EOF
diff --git a/contrib/cirrus/lib.sh.t b/contrib/cirrus/lib.sh.t
index 8f4080dd5..204af1245 100755
--- a/contrib/cirrus/lib.sh.t
+++ b/contrib/cirrus/lib.sh.t
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Unit tests for some functions in lib.sh
#
diff --git a/contrib/cirrus/logcollector.sh b/contrib/cirrus/logcollector.sh
index 859da2966..fd5017b44 100755
--- a/contrib/cirrus/logcollector.sh
+++ b/contrib/cirrus/logcollector.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/contrib/cirrus/networking.sh b/contrib/cirrus/networking.sh
index 2546fab71..824d03e44 100755
--- a/contrib/cirrus/networking.sh
+++ b/contrib/cirrus/networking.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# This script attempts basic confirmation of functional networking
# by connecting to a set of essential external servers and failing
diff --git a/contrib/cirrus/notice_branch_failure.sh b/contrib/cirrus/notice_branch_failure.sh
index f030c12e5..b810bd266 100755
--- a/contrib/cirrus/notice_branch_failure.sh
+++ b/contrib/cirrus/notice_branch_failure.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/contrib/cirrus/ooe.sh b/contrib/cirrus/ooe.sh
index 3c8a0409d..0966b5ce8 100755
--- a/contrib/cirrus/ooe.sh
+++ b/contrib/cirrus/ooe.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# This script executes a command while logging all output to a temporary
# file. If the command exits non-zero, then all output is sent to the console,
diff --git a/contrib/cirrus/packer/fedora_base-setup.sh b/contrib/cirrus/packer/fedora_base-setup.sh
index f271abee0..bf29a1aec 100644
--- a/contrib/cirrus/packer/fedora_base-setup.sh
+++ b/contrib/cirrus/packer/fedora_base-setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# N/B: This script is not intended to be run by humans. It is used to configure the
# fedora base image for importing, so that it will boot in GCE
diff --git a/contrib/cirrus/packer/fedora_packaging.sh b/contrib/cirrus/packer/fedora_packaging.sh
index 4a8f62e45..fcf9eb93f 100644
--- a/contrib/cirrus/packer/fedora_packaging.sh
+++ b/contrib/cirrus/packer/fedora_packaging.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# This script is called from fedora_setup.sh and various Dockerfiles.
# It's not intended to be used outside of those contexts. It assumes the lib.sh
diff --git a/contrib/cirrus/packer/fedora_setup.sh b/contrib/cirrus/packer/fedora_setup.sh
index 25b568e8a..16ae87d8a 100644
--- a/contrib/cirrus/packer/fedora_setup.sh
+++ b/contrib/cirrus/packer/fedora_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# This script is called by packer on the subject fedora VM, to setup the podman
# build/test environment. It's not intended to be used outside of this context.
diff --git a/contrib/cirrus/packer/image-builder-image_base-setup.sh b/contrib/cirrus/packer/image-builder-image_base-setup.sh
index 78772da09..26fbe2903 100644
--- a/contrib/cirrus/packer/image-builder-image_base-setup.sh
+++ b/contrib/cirrus/packer/image-builder-image_base-setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# This script is called by packer on a vanilla CentOS VM, to setup the image
# used for building images FROM base images. It's not intended to be used
diff --git a/contrib/cirrus/packer/make-user-data.sh b/contrib/cirrus/packer/make-user-data.sh
index 7f7fa1c1a..676a50f5c 100644
--- a/contrib/cirrus/packer/make-user-data.sh
+++ b/contrib/cirrus/packer/make-user-data.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# This script is utilized by Makefile, it's not intended to be run by humans
diff --git a/contrib/cirrus/packer/prior-fedora_base-setup.sh b/contrib/cirrus/packer/prior-fedora_base-setup.sh
index f271abee0..bf29a1aec 100644
--- a/contrib/cirrus/packer/prior-fedora_base-setup.sh
+++ b/contrib/cirrus/packer/prior-fedora_base-setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# N/B: This script is not intended to be run by humans. It is used to configure the
# fedora base image for importing, so that it will boot in GCE
diff --git a/contrib/cirrus/packer/systemd_banish.sh b/contrib/cirrus/packer/systemd_banish.sh
index 6e2dd9c3e..2219f2a4f 100755
--- a/contrib/cirrus/packer/systemd_banish.sh
+++ b/contrib/cirrus/packer/systemd_banish.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set +e # Not all of these exist on every platform
diff --git a/contrib/cirrus/packer/ubuntu_packaging.sh b/contrib/cirrus/packer/ubuntu_packaging.sh
index 935e81147..c478028b5 100644
--- a/contrib/cirrus/packer/ubuntu_packaging.sh
+++ b/contrib/cirrus/packer/ubuntu_packaging.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# This script is called from ubuntu_setup.sh and various Dockerfiles.
# It's not intended to be used outside of those contexts. It assumes the lib.sh
diff --git a/contrib/cirrus/packer/ubuntu_setup.sh b/contrib/cirrus/packer/ubuntu_setup.sh
index 2febbd265..d650e6c76 100644
--- a/contrib/cirrus/packer/ubuntu_setup.sh
+++ b/contrib/cirrus/packer/ubuntu_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# This script is called by packer on the subject Ubuntu VM, to setup the podman
# build/test environment. It's not intended to be used outside of this context.
diff --git a/contrib/cirrus/packer/xfedora_setup.sh b/contrib/cirrus/packer/xfedora_setup.sh
index 25b568e8a..16ae87d8a 100644
--- a/contrib/cirrus/packer/xfedora_setup.sh
+++ b/contrib/cirrus/packer/xfedora_setup.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# This script is called by packer on the subject fedora VM, to setup the podman
# build/test environment. It's not intended to be used outside of this context.
diff --git a/contrib/cirrus/rootless_test.sh b/contrib/cirrus/rootless_test.sh
index 63cbec69b..31db18302 100755
--- a/contrib/cirrus/rootless_test.sh
+++ b/contrib/cirrus/rootless_test.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/contrib/cirrus/setup_container_environment.sh b/contrib/cirrus/setup_container_environment.sh
index c268c162e..72542df17 100755
--- a/contrib/cirrus/setup_container_environment.sh
+++ b/contrib/cirrus/setup_container_environment.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
source $(dirname $0)/lib.sh
diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh
index 0b9d686d3..eeae96469 100755
--- a/contrib/cirrus/setup_environment.sh
+++ b/contrib/cirrus/setup_environment.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/contrib/cirrus/success.sh b/contrib/cirrus/success.sh
index 3b171757f..8783f6b81 100755
--- a/contrib/cirrus/success.sh
+++ b/contrib/cirrus/success.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/contrib/cirrus/system_test.sh b/contrib/cirrus/system_test.sh
index 546fe8e30..dbee078b6 100755
--- a/contrib/cirrus/system_test.sh
+++ b/contrib/cirrus/system_test.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/contrib/cirrus/unit_test.sh b/contrib/cirrus/unit_test.sh
index 2852c31ae..17a618a1c 100755
--- a/contrib/cirrus/unit_test.sh
+++ b/contrib/cirrus/unit_test.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/contrib/cirrus/update_meta.sh b/contrib/cirrus/update_meta.sh
index 618cd670c..6e4a473e9 100755
--- a/contrib/cirrus/update_meta.sh
+++ b/contrib/cirrus/update_meta.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
source $(dirname $0)/lib.sh
diff --git a/contrib/cirrus/upload_release_archive.sh b/contrib/cirrus/upload_release_archive.sh
index e1b8937b7..2e2f4ddde 100755
--- a/contrib/cirrus/upload_release_archive.sh
+++ b/contrib/cirrus/upload_release_archive.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -eo pipefail
diff --git a/contrib/gate/entrypoint.sh b/contrib/gate/entrypoint.sh
index ab6528e00..102d012e5 100755
--- a/contrib/gate/entrypoint.sh
+++ b/contrib/gate/entrypoint.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/contrib/imgprune/entrypoint.sh b/contrib/imgprune/entrypoint.sh
index b0f006332..fd80d9b26 100755
--- a/contrib/imgprune/entrypoint.sh
+++ b/contrib/imgprune/entrypoint.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/contrib/imgts/entrypoint.sh b/contrib/imgts/entrypoint.sh
index 9c653eda0..b089e1e9b 100755
--- a/contrib/imgts/entrypoint.sh
+++ b/contrib/imgts/entrypoint.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/contrib/imgts/lib_entrypoint.sh b/contrib/imgts/lib_entrypoint.sh
index 3f6b11128..6eb5cdc2f 100644
--- a/contrib/imgts/lib_entrypoint.sh
+++ b/contrib/imgts/lib_entrypoint.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/contrib/upldrel/entrypoint.sh b/contrib/upldrel/entrypoint.sh
index dc0e69676..6eb1b8f94 100755
--- a/contrib/upldrel/entrypoint.sh
+++ b/contrib/upldrel/entrypoint.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/docs/remote-docs.sh b/docs/remote-docs.sh
index 4774b94a3..6d520fae6 100755
--- a/docs/remote-docs.sh
+++ b/docs/remote-docs.sh
@@ -1,5 +1,6 @@
-#!/bin/bash -e
+#!/usr/bin/env bash
# Assemble remote man pages for darwin or windows from markdown files
+set -e
PLATFORM=$1 ## linux, windows or darwin
TARGET=${2} ## where to output files
diff --git a/hack/apparmor_tag.sh b/hack/apparmor_tag.sh
index 0fd222210..794370e79 100755
--- a/hack/apparmor_tag.sh
+++ b/hack/apparmor_tag.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
if pkg-config libapparmor 2> /dev/null ; then
echo apparmor
fi
diff --git a/hack/btrfs_installed_tag.sh b/hack/btrfs_installed_tag.sh
index 357f33b8b..c4d99f377 100755
--- a/hack/btrfs_installed_tag.sh
+++ b/hack/btrfs_installed_tag.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
cc -E - > /dev/null 2> /dev/null << EOF
#include <btrfs/ioctl.h>
EOF
diff --git a/hack/btrfs_tag.sh b/hack/btrfs_tag.sh
index cc48504ab..59cb969ad 100755
--- a/hack/btrfs_tag.sh
+++ b/hack/btrfs_tag.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
cc -E - > /dev/null 2> /dev/null << EOF
#include <btrfs/version.h>
EOF
diff --git a/hack/check_root.sh b/hack/check_root.sh
index 203eae9d3..1f53887ff 100755
--- a/hack/check_root.sh
+++ b/hack/check_root.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
if ! [ $(id -u) = 0 ]; then
echo "Please run as root! '$@' requires root privileges."
exit 1
diff --git a/hack/get_ci_vm.sh b/hack/get_ci_vm.sh
index 05b7a4a6d..b37dba508 100755
--- a/hack/get_ci_vm.sh
+++ b/hack/get_ci_vm.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/hack/get_release_info.sh b/hack/get_release_info.sh
index c1c694a44..69cf8cd57 100755
--- a/hack/get_release_info.sh
+++ b/hack/get_release_info.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# This script produces various bits of metadata needed by Makefile. Using
# a script allows uniform behavior across multiple environments and
diff --git a/hack/golangci-lint.sh b/hack/golangci-lint.sh
index 8c81a3743..03c29c89a 100755
--- a/hack/golangci-lint.sh
+++ b/hack/golangci-lint.sh
@@ -1,6 +1,7 @@
-#!/bin/bash -e
+#!/usr/bin/env bash
# Need to run linter twice to cover all the build tags code paths
+set -e
declare -A BUILD_TAGS
# TODO: add systemd tag
diff --git a/hack/install_bats.sh b/hack/install_bats.sh
index 00ded07a9..d30e3daf8 100755
--- a/hack/install_bats.sh
+++ b/hack/install_bats.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/hack/install_catatonit.sh b/hack/install_catatonit.sh
index 7fd7592a9..8837db3a8 100755
--- a/hack/install_catatonit.sh
+++ b/hack/install_catatonit.sh
@@ -1,7 +1,8 @@
-#!/bin/bash -e
+#!/usr/bin/env bash
BASE_PATH="/usr/libexec/podman"
CATATONIT_PATH="${BASE_PATH}/catatonit"
CATATONIT_VERSION="v0.1.4"
+set -e
if [ -f $CATATONIT_PATH ]; then
echo "skipping ... catatonit is already installed"
diff --git a/hack/install_golangci.sh b/hack/install_golangci.sh
index 6ef8ce823..57cdd2e4d 100755
--- a/hack/install_golangci.sh
+++ b/hack/install_golangci.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
diff --git a/hack/libdm_tag.sh b/hack/libdm_tag.sh
index d1f83ba10..d3668aab1 100755
--- a/hack/libdm_tag.sh
+++ b/hack/libdm_tag.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
tmpdir="$PWD/tmp.$RANDOM"
mkdir -p "$tmpdir"
trap 'rm -fr "$tmpdir"' EXIT
diff --git a/hack/man-page-checker b/hack/man-page-checker
index d2cc6c6e1..45f9edbd1 100755
--- a/hack/man-page-checker
+++ b/hack/man-page-checker
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# man-page-checker - validate and cross-reference man page names
#
diff --git a/hack/podman-commands.sh b/hack/podman-commands.sh
index da4d446aa..587cac782 100755
--- a/hack/podman-commands.sh
+++ b/hack/podman-commands.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Compare commands listed by 'podman help' against those in 'man podman'.
# Recurse into subcommands as well.
diff --git a/hack/podmanv2-retry b/hack/podmanv2-retry
index ea77486ff..1f3be0731 100755
--- a/hack/podmanv2-retry
+++ b/hack/podmanv2-retry
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# podman-try - try running a command via PODMAN1; use PODMAN2 as fallback
#
diff --git a/hack/selinux_tag.sh b/hack/selinux_tag.sh
index ff80fda04..993630ad6 100755
--- a/hack/selinux_tag.sh
+++ b/hack/selinux_tag.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
if pkg-config libselinux 2> /dev/null ; then
echo selinux
fi
diff --git a/hack/tree_status.sh b/hack/tree_status.sh
index ac874a347..2f56cdcd3 100755
--- a/hack/tree_status.sh
+++ b/hack/tree_status.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
set -e
SUGGESTION="${SUGGESTION:-sync the vendor.conf and commit all changes.}"
diff --git a/test/apiv2/test-apiv2 b/test/apiv2/test-apiv2
index d0bf28b9a..2f01783ff 100755
--- a/test/apiv2/test-apiv2
+++ b/test/apiv2/test-apiv2
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# Usage: test-apiv2 [PORT]
#
diff --git a/test/system/400-unprivileged-access.bats b/test/system/400-unprivileged-access.bats
index 1b2d14554..142d7dcd9 100644
--- a/test/system/400-unprivileged-access.bats
+++ b/test/system/400-unprivileged-access.bats
@@ -23,7 +23,7 @@ load helpers
# as a user, the parent directory must be world-readable.
test_script=$PODMAN_TMPDIR/fail-if-writable
cat >$test_script <<"EOF"
-#!/bin/bash
+#!/usr/bin/env bash
path="$1"
diff --git a/test/system/helpers.t b/test/system/helpers.t
index bee09505c..7a331174b 100755
--- a/test/system/helpers.t
+++ b/test/system/helpers.t
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# regression tests for helpers.bash
#
diff --git a/test/test_podman_baseline.sh b/test/test_podman_baseline.sh
index d205f544a..3624d24c2 100755
--- a/test/test_podman_baseline.sh
+++ b/test/test_podman_baseline.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# test_podman_baseline.sh
# A script to be run at the command line with Podman installed.
# This should be run against a new kit to provide base level testing
@@ -215,7 +215,7 @@ podman run $image ls /
########
FILE=./runecho.sh
/bin/cat <<EOM >$FILE
-#!/bin/bash
+#!/usr/bin/env bash
for i in {1..9};
do
echo "This is a new container pull ipbabble [" \$i "]"
diff --git a/test/test_podman_build.sh b/test/test_podman_build.sh
index e3e53cae6..29b7354b1 100644
--- a/test/test_podman_build.sh
+++ b/test/test_podman_build.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
#
# test_podman_build.sh
#
diff --git a/test/test_podman_pods.sh b/test/test_podman_pods.sh
index f2f47f510..c19f4fcab 100755
--- a/test/test_podman_pods.sh
+++ b/test/test_podman_pods.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# test_podman_pods.sh
# A script to be run at the command line with Podman installed.
# This should be run against a new kit to provide base level testing