diff --git a/crates/tor-rtcompat/misc/matrix b/crates/tor-rtcompat/misc/matrix index 4031a2490..90924c044 100755 --- a/crates/tor-rtcompat/misc/matrix +++ b/crates/tor-rtcompat/misc/matrix @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # # Run a provided command over all possible subsets of important # tor-rtcompat features. diff --git a/maint/add_warning b/maint/add_warning index 0310c8dad..a86caa357 100755 --- a/maint/add_warning +++ b/maint/add_warning @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import argparse import fnmatch diff --git a/maint/adhoc-add-lint-blocks b/maint/adhoc-add-lint-blocks index 6305e3a97..a07754eff 100755 --- a/maint/adhoc-add-lint-blocks +++ b/maint/adhoc-add-lint-blocks @@ -1,4 +1,4 @@ -#!/usr/bin/perl -i -p +#!/usr/bin/env perl -i -p # adhoc script for adding lint blocks to mod test everywhere # diff --git a/maint/binary_size b/maint/binary_size index 0fd793248..85ec23b2c 100755 --- a/maint/binary_size +++ b/maint/binary_size @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # binary_size: Build arti with a given set of options, and # dump the binary size in a json format. diff --git a/maint/cargo_audit b/maint/cargo_audit index 8378a66ad..78af299da 100755 --- a/maint/cargo_audit +++ b/maint/cargo_audit @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Run "cargo audit" with an appropriate set of flags. diff --git a/maint/cargo_check_target b/maint/cargo_check_target index 23c83826f..e71dcdc82 100755 --- a/maint/cargo_check_target +++ b/maint/cargo_check_target @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail diff --git a/maint/cargo_sort b/maint/cargo_sort index e822d7600..4da9ea487 100755 --- a/maint/cargo_sort +++ b/maint/cargo_sort @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Run "cargo sort" to check that the Cargo.tomls are sorted diff --git a/maint/changed_crates b/maint/changed_crates index 0d425d8c5..1ef1a4804 100755 --- a/maint/changed_crates +++ b/maint/changed_crates @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail diff --git a/maint/check_doc_features b/maint/check_doc_features index c57e2e88e..2084ea2a6 100755 --- a/maint/check_doc_features +++ b/maint/check_doc_features @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 import os from list_crates import crate_list diff --git a/maint/check_licenses b/maint/check_licenses index 4239cb3e3..f74d0698d 100755 --- a/maint/check_licenses +++ b/maint/check_licenses @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail diff --git a/maint/check_toposort b/maint/check_toposort index 957186894..1cc9f7d08 100755 --- a/maint/check_toposort +++ b/maint/check_toposort @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # # Helper script: makes sure that the crates as listed in Cargo.toml are # topologically sorted from lowest-level to highest level. diff --git a/maint/check_tree b/maint/check_tree index 959bf8613..de3600e22 100755 --- a/maint/check_tree +++ b/maint/check_tree @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Use cargo-tree to check our dependencies for crates which we must # not depend on unconditionally. diff --git a/maint/ci_log_span b/maint/ci_log_span index f2366c711..69951e5d9 100755 --- a/maint/ci_log_span +++ b/maint/ci_log_span @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # usage: $0 "" # eg: $0 start 'my_section[collapsed=true]' "My collapsed section" diff --git a/maint/coverage b/maint/coverage index b0f66b2f3..d96423143 100755 --- a/maint/coverage +++ b/maint/coverage @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function usage() { diff --git a/maint/coverage_fuzz_corpora b/maint/coverage_fuzz_corpora index 3b3948124..53a0af17c 100755 --- a/maint/coverage_fuzz_corpora +++ b/maint/coverage_fuzz_corpora @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail diff --git a/maint/crate_versions b/maint/crate_versions index d591ba241..0d42b0fdc 100755 --- a/maint/crate_versions +++ b/maint/crate_versions @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # List the current version of every crate. diff --git a/maint/docker_reproducible_build b/maint/docker_reproducible_build index f23f71354..34c923e6f 100755 --- a/maint/docker_reproducible_build +++ b/maint/docker_reproducible_build @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This script runs as the top level of our reproducible build process. # It launches the actual build script inside a docker container. diff --git a/maint/downgrade_dependencies b/maint/downgrade_dependencies index 33ba6cb37..37afbc6de 100755 --- a/maint/downgrade_dependencies +++ b/maint/downgrade_dependencies @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Downgrades every one of our dependencies in Cargo.lock to the # earliest version listed in our Cargo.toml files. (And then diff --git a/maint/fuzz_it_all b/maint/fuzz_it_all index dc60caee5..40df889a3 100755 --- a/maint/fuzz_it_all +++ b/maint/fuzz_it_all @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail diff --git a/maint/gen_md_links b/maint/gen_md_links index ca7efc2fa..289d84a3b 100755 --- a/maint/gen_md_links +++ b/maint/gen_md_links @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 """ Given some markdown text of the general kind we use in Arti changelogs, diff --git a/maint/hooks/pre-commit b/maint/hooks/pre-commit index 0c50622a9..46071bea2 100755 --- a/maint/hooks/pre-commit +++ b/maint/hooks/pre-commit @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail diff --git a/maint/hooks/pre-push b/maint/hooks/pre-push index d767d30c6..542f74785 100755 --- a/maint/hooks/pre-push +++ b/maint/hooks/pre-push @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail diff --git a/maint/list_crates b/maint/list_crates index 93647bc71..809bfcf1e 100755 --- a/maint/list_crates +++ b/maint/list_crates @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # # List our crates as they appear in Cargo.toml. Useful for scripting. diff --git a/maint/matrix_test b/maint/matrix_test index 1dcf2b8c3..969450e6f 100755 --- a/maint/matrix_test +++ b/maint/matrix_test @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import toml.decoder import sys diff --git a/maint/matrix_test_cfg b/maint/matrix_test_cfg index 45238dd31..f30737c77 100755 --- a/maint/matrix_test_cfg +++ b/maint/matrix_test_cfg @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # Run cargo check and cargo test with various featuresets relevant to configuration diff --git a/maint/postprocess_coverage_cobertura b/maint/postprocess_coverage_cobertura index ffcfc5464..e1a24a408 100755 --- a/maint/postprocess_coverage_cobertura +++ b/maint/postprocess_coverage_cobertura @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # # Use BeautifulSoup to deduplicate functions in a grov XML (cobertura) # output file. diff --git a/maint/postprocess_coverage_html b/maint/postprocess_coverage_html index 97e65814a..81a940e5f 100755 --- a/maint/postprocess_coverage_html +++ b/maint/postprocess_coverage_html @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # # Use BeautifulSoup to mangle a grov HTML output file and insert other # things we care about. diff --git a/maint/preserve b/maint/preserve index 1517b5e68..ac349fd5f 100755 --- a/maint/preserve +++ b/maint/preserve @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # This script is meant to preserve and restore CI artifacts so they can be passed from job to job. # See arti!786 for why it is done this way, and what could be done better. diff --git a/maint/reproducible_build b/maint/reproducible_build index b431df18e..9bb3bde47 100755 --- a/maint/reproducible_build +++ b/maint/reproducible_build @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # # This script is run inside a docker container as part of our # reproducible build process. diff --git a/maint/shellcheck_all b/maint/shellcheck_all index 7c7c24428..7c79ed46d 100755 --- a/maint/shellcheck_all +++ b/maint/shellcheck_all @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail diff --git a/maint/stunt/fake-cc b/maint/stunt/fake-cc index 6ae222efd..c8457fc92 100755 --- a/maint/stunt/fake-cc +++ b/maint/stunt/fake-cc @@ -1,3 +1,3 @@ -#!/bin/sh +#!/usr/bin/env sh # this is made to convince openssl-sys we have a working compiler for the target it wants echo RUST_VERSION_OPENSSL_0x101010efL diff --git a/maint/thanks b/maint/thanks index 6c497c875..42deabcd0 100755 --- a/maint/thanks +++ b/maint/thanks @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail if [ -z "${1-}" ]; then diff --git a/maint/via-cargo-install-in-ci b/maint/via-cargo-install-in-ci index aeda8a87a..a228c8007 100755 --- a/maint/via-cargo-install-in-ci +++ b/maint/via-cargo-install-in-ci @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail diff --git a/maint/with_coverage b/maint/with_coverage index 3515613ff..3d6ecb809 100755 --- a/maint/with_coverage +++ b/maint/with_coverage @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail diff --git a/tests/chutney/arti-bench b/tests/chutney/arti-bench index bca81acbf..d37578d86 100755 --- a/tests/chutney/arti-bench +++ b/tests/chutney/arti-bench @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -xeuo pipefail if [ -z "${RUST_LOG:-}" ]; then diff --git a/tests/chutney/setup b/tests/chutney/setup index d8120eac3..ef2ad908d 100755 --- a/tests/chutney/setup +++ b/tests/chutney/setup @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -xeuo pipefail diff --git a/tests/chutney/stop-arti b/tests/chutney/stop-arti index 225e05377..6161b645c 100755 --- a/tests/chutney/stop-arti +++ b/tests/chutney/stop-arti @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -xeuo pipefail cd "$(git rev-parse --show-toplevel)" diff --git a/tests/chutney/teardown b/tests/chutney/teardown index e9405424c..a85140f9e 100755 --- a/tests/chutney/teardown +++ b/tests/chutney/teardown @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -xeuo pipefail cd "$(git rev-parse --show-toplevel)" diff --git a/tests/chutney/test b/tests/chutney/test index fe56369a8..044ebd7b7 100755 --- a/tests/chutney/test +++ b/tests/chutney/test @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -xeuo pipefail diff --git a/tests/shadow/run.sh b/tests/shadow/run.sh index ceb5a06f7..1dfd0769d 100755 --- a/tests/shadow/run.sh +++ b/tests/shadow/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -xeuo pipefail