shell: use /usr/bin/env instead of absolute paths

This commit changes the shebang in all shell scripts from absolute
paths (such as `/bin/bash` or `/usr/bin/python3`) to the `/usr/bin/env`
binary with the accompanying interpreter as it's argument.

The reason for this are as follows:
- NixOS cannot work with absolute paths
- BSD systems install their packages in /usr/local/bin
This commit is contained in:
Emil Engler 2023-01-25 18:35:53 +01:00
parent 3b2848f904
commit 79097484de
No known key found for this signature in database
GPG Key ID: 2F6D4145C55FC7C7
40 changed files with 40 additions and 40 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python3
#
# Run a provided command over all possible subsets of important
# tor-rtcompat features.

View File

@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3
import argparse
import fnmatch

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Run "cargo audit" with an appropriate set of flags.

View File

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

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Run "cargo sort" to check that the Cargo.tomls are sorted

View File

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

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python3
import os
from list_crates import crate_list

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# usage: $0 <start|end> <section_identifier+config> "<human section name>"
# eg: $0 start 'my_section[collapsed=true]' "My collapsed section"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
function usage()
{

View File

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

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# List the current version of every crate.

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python3
"""
Given some markdown text of the general kind we use in Arti changelogs,

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python3
#
# List our crates as they appear in Cargo.toml. Useful for scripting.

View File

@ -1,4 +1,4 @@
#!/usr/bin/python3
#!/usr/bin/env python3
import toml.decoder
import sys

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Run cargo check and cargo test with various featuresets relevant to configuration

View File

@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python3
#
# Use BeautifulSoup to deduplicate functions in a grov XML (cobertura)
# output file.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail
if [ -z "${1-}" ]; then

View File

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

View File

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

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -xeuo pipefail
if [ -z "${RUST_LOG:-}" ]; then

View File

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

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -xeuo pipefail
cd "$(git rev-parse --show-toplevel)"

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -xeuo pipefail
cd "$(git rev-parse --show-toplevel)"

View File

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

View File

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