Make shebangs and other bash usage portable (#2179)

pull/2172/head
Aaron Adams 2 years ago committed by GitHub
parent 9fe3a87b52
commit 68c648bee0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Benchmark context command
make test > /dev/null
git log --abbrev-commit --pretty=oneline HEAD^..HEAD

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if ! (($#)); then
cat <<- _EOF_

@ -1,4 +1,5 @@
#!/bin/bash -e
#!/usr/bin/env bash
set -e
echo "# --------------------------------------"
echo "# Install testing tools."
@ -8,7 +9,7 @@ echo "# --------------------------------------"
hook_script_path=".git/hooks/pre-push"
hook_script=$(
cat << 'EOF'
#!/bin/bash
#!/usr/bin/env bash
diff_command="git diff --no-ext-diff --ignore-submodules"

@ -29,7 +29,8 @@ REASON_CANNOT_ATTACH = (
@pytest.fixture
def launched_bash_binary():
path = tempfile.mktemp()
subprocess.check_output(["cp", "/bin/bash", path])
bash_path = subprocess.check_output(["which", "bash"]).decode().strip()
subprocess.check_output(["cp", bash_path, path])
process = subprocess.Popen([path], stdout=subprocess.PIPE, stdin=subprocess.PIPE)

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

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
make -C binaries

Loading…
Cancel
Save