fix: avoid hardcoded (ba)sh path in helper scripts.

Prior to this commit some helper scripts used hardcoded paths to
`/bin/sh` and `/bin/bash` in script shebangs. This will error on systems
that don't place `bash` in `/bin/` (e.g. NixOS).

This commit updates the scripts to use `/usr/bin/env` to find `bash`
based on the user's `$PATH`. This has better portability and allows the
scripts to run without err (or specifying an interpreter explicitly) on
systems with atypical `bash` installs.
This commit is contained in:
Daniel McCarney 2023-03-01 10:17:38 -05:00 committed by Dirkjan Ochtman
parent 8e319df43d
commit 44bac99c6e
9 changed files with 11 additions and 9 deletions

View File

@ -1,6 +1,6 @@
RECORD=perf record -F2000 --call-graph dwarf,16000 --
FLAMEGRAPH=perf script | ~/FlameGraph/stackcollapse-perf.pl | ~/FlameGraph/flamegraph.pl >
MEMUSAGE=/usr/bin/time -f %M
MEMUSAGE=/usr/bin/env time -f %M
perf: ./target/release/examples/bench
$(RECORD) ./target/release/examples/bench bulk TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

View File

@ -1,4 +1,6 @@
#!/bin/bash -e
#!/usr/bin/env bash
set -e
source <(cargo llvm-cov show-env --export-prefix)
cargo llvm-cov clean --workspace

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
# Extract the introductory documentation into the README.md
set -e

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
# Extract the example usage into README.md
set -e

View File

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

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 fetches, builds, and runs the BoringSSL
# TLS test tool ('BoGo') against rustls.

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
set -xe

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
# This script fetches, builds, and runs the TryTLS
# TLS test tool against rustls. The rustls-TryTLS test stub is