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>
This commit is contained in:
Sascha Grunert
2020-08-17 09:18:02 +02:00
parent 96fb5dc94d
commit ba9f18e2b8
61 changed files with 65 additions and 62 deletions

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if pkg-config libapparmor 2> /dev/null ; then
echo apparmor
fi

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
cc -E - > /dev/null 2> /dev/null << EOF
#include <btrfs/ioctl.h>
EOF

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
cc -E - > /dev/null 2> /dev/null << EOF
#include <btrfs/version.h>
EOF

View File

@@ -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

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

View File

@@ -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

View File

@@ -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

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

View File

@@ -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"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
tmpdir="$PWD/tmp.$RANDOM"
mkdir -p "$tmpdir"
trap 'rm -fr "$tmpdir"' EXIT

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# man-page-checker - validate and cross-reference man page names
#

View File

@@ -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.

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# podman-try - try running a command via PODMAN1; use PODMAN2 as fallback
#

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if pkg-config libselinux 2> /dev/null ; then
echo selinux
fi

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
SUGGESTION="${SUGGESTION:-sync the vendor.conf and commit all changes.}"