From ba9f18e2b87a1dc6b9f7fea304379c4e41aaaa85 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Mon, 17 Aug 2020 09:18:02 +0200 Subject: [PATCH] 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 --- contrib/build_rpm.sh | 2 +- contrib/cirrus/add_second_partition.sh | 2 +- contrib/cirrus/apiv2_test.sh | 2 +- contrib/cirrus/build_release.sh | 2 +- contrib/cirrus/build_swagger.sh | 2 +- contrib/cirrus/build_vm_images.sh | 2 +- contrib/cirrus/check_image.sh | 2 +- contrib/cirrus/container_test.sh | 2 +- contrib/cirrus/integration_test.sh | 2 +- contrib/cirrus/lib.sh | 2 +- contrib/cirrus/lib.sh.t | 2 +- contrib/cirrus/logcollector.sh | 2 +- contrib/cirrus/networking.sh | 2 +- contrib/cirrus/notice_branch_failure.sh | 2 +- contrib/cirrus/ooe.sh | 2 +- contrib/cirrus/packer/fedora_base-setup.sh | 2 +- contrib/cirrus/packer/fedora_packaging.sh | 2 +- contrib/cirrus/packer/fedora_setup.sh | 2 +- contrib/cirrus/packer/image-builder-image_base-setup.sh | 2 +- contrib/cirrus/packer/make-user-data.sh | 2 +- contrib/cirrus/packer/prior-fedora_base-setup.sh | 2 +- contrib/cirrus/packer/systemd_banish.sh | 2 +- contrib/cirrus/packer/ubuntu_packaging.sh | 2 +- contrib/cirrus/packer/ubuntu_setup.sh | 2 +- contrib/cirrus/packer/xfedora_setup.sh | 2 +- contrib/cirrus/rootless_test.sh | 2 +- contrib/cirrus/setup_container_environment.sh | 2 +- contrib/cirrus/setup_environment.sh | 2 +- contrib/cirrus/success.sh | 2 +- contrib/cirrus/system_test.sh | 2 +- contrib/cirrus/unit_test.sh | 2 +- contrib/cirrus/update_meta.sh | 2 +- contrib/cirrus/upload_release_archive.sh | 2 +- contrib/gate/entrypoint.sh | 2 +- contrib/imgprune/entrypoint.sh | 2 +- contrib/imgts/entrypoint.sh | 2 +- contrib/imgts/lib_entrypoint.sh | 2 +- contrib/upldrel/entrypoint.sh | 2 +- docs/remote-docs.sh | 3 ++- hack/apparmor_tag.sh | 2 +- hack/btrfs_installed_tag.sh | 2 +- hack/btrfs_tag.sh | 2 +- hack/check_root.sh | 2 +- hack/get_ci_vm.sh | 2 +- hack/get_release_info.sh | 2 +- hack/golangci-lint.sh | 3 ++- hack/install_bats.sh | 2 +- hack/install_catatonit.sh | 3 ++- hack/install_golangci.sh | 2 +- hack/libdm_tag.sh | 2 +- hack/man-page-checker | 2 +- hack/podman-commands.sh | 2 +- hack/podmanv2-retry | 2 +- hack/selinux_tag.sh | 2 +- hack/tree_status.sh | 2 +- test/apiv2/test-apiv2 | 2 +- test/system/400-unprivileged-access.bats | 2 +- test/system/helpers.t | 2 +- test/test_podman_baseline.sh | 4 ++-- test/test_podman_build.sh | 2 +- test/test_podman_pods.sh | 2 +- 61 files changed, 65 insertions(+), 62 deletions(-) diff --git a/contrib/build_rpm.sh b/contrib/build_rpm.sh index a4f1817b95..6a82b131fd 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 73db192c55..3c2f9f0564 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 546fe8e307..dbee078b64 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 45634f3685..46fe9781fc 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 0471f0c10a..eb9288dcd9 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 543f83a146..be1c821856 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 13172fe1c4..04867ca64b 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 b56a122326..8ea66e63c6 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 c65f5e25f9..636d674115 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 968b2de396..3292e9d144 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 8f4080dd51..204af1245a 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 859da29660..fd5017b449 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 2546fab71f..824d03e449 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 f030c12e5e..b810bd266c 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 3c8a0409dd..0966b5ce85 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 f271abee0b..bf29a1aec2 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 4a8f62e45d..fcf9eb93fb 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 25b568e8ae..16ae87d8a2 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 78772da099..26fbe2903c 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 7f7fa1c1af..676a50f5c9 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 f271abee0b..bf29a1aec2 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 6e2dd9c3eb..2219f2a4f1 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 935e811472..c478028b56 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 2febbd265e..d650e6c76b 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 25b568e8ae..16ae87d8a2 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 63cbec69b4..31db183029 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 c268c162e8..72542df17e 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 0b9d686d32..eeae964696 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 3b171757fb..8783f6b815 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 546fe8e307..dbee078b64 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 2852c31ae9..17a618a1c0 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 618cd670cb..6e4a473e94 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 e1b8937b76..2e2f4ddde3 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 ab6528e00d..102d012e51 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 b0f006332e..fd80d9b265 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 9c653eda04..b089e1e9bd 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 3f6b111284..6eb5cdc2f8 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 dc0e696763..6eb1b8f946 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 4774b94a36..6d520fae60 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 0fd2222107..794370e79d 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 357f33b8bc..c4d99f377f 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 EOF diff --git a/hack/btrfs_tag.sh b/hack/btrfs_tag.sh index cc48504ab3..59cb969ad6 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 EOF diff --git a/hack/check_root.sh b/hack/check_root.sh index 203eae9d36..1f53887ff8 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 05b7a4a6d8..b37dba508e 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 c1c694a449..69cf8cd571 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 8c81a3743d..03c29c89a8 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 00ded07a9a..d30e3daf83 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 7fd7592a90..8837db3a88 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 6ef8ce8237..57cdd2e4d6 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 d1f83ba101..d3668aab1c 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 d2cc6c6e1a..45f9edbd1b 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 da4d446aa6..587cac782e 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 ea77486ff6..1f3be0731b 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 ff80fda04b..993630ad62 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 ac874a3478..2f56cdcd32 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 d0bf28b9aa..2f01783ff5 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 1b2d14554d..142d7dcd9a 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 bee09505ce..7a331174b8 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 d205f544a1..3624d24c2e 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 <$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 e3e53cae66..29b7354b1c 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 f2f47f510a..c19f4fcabc 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