misc: Use /usr/bin/env for a more generic shebang

Use path based SHELL in Makefiles. It was suggested that this is a
better solution for make for cases when there is no /usr/bin/env.

See: https://github.com/purpleidea/mgmt/pull/694#discussion_r1015596204
This commit is contained in:
Karpfen
2025-03-22 14:53:21 -04:00
committed by James Shubin
parent f2d9219218
commit 7e8ced534f
92 changed files with 92 additions and 92 deletions

View File

@@ -27,7 +27,7 @@
# additional permission if he deems it necessary to achieve the goals of this
# additional permission.
SHELL = /usr/bin/env bash
SHELL = bash
.PHONY: all build clean
all: build

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
exit 0 # XXX: disable for now

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
exit 0 # XXX: disable for now

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
# FIXME: test for #124 --- Disabled for now

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
exit 0 # XXX: disable for now

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
# vim: noet:ts=8:sts=8:sw=8
exit 0 # XXX: disable for now

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
# vim: noet:ts=8:sts=8:sw=8
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -xe
#!/usr/bin/env -S bash -xe
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
# NOTES:
# * this is a simple shell based `mgmt` test case
# * it is recommended that you run mgmt wrapped in the timeout command

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
. "$(dirname "$0")/../util.sh"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# check for any bash files that aren't properly formatted
# TODO: this is hardly exhaustive

View File

@@ -1,4 +1,4 @@
#!/bin/bash -e
#!/usr/bin/env -S bash -e
# tests if commit message conforms to convention
# library of utility functions

View File

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

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# check that our documentation still generates, even if we don't use it here
# shellcheck disable=SC1091

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# check that our examples still build, even if we don't run them here
# shellcheck disable=SC1091

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# original version of this script from kubernetes project, under ALv2 license
echo running "$0"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# check a bunch of linters with the golangci_lint
# TODO: run this from the test-golint.sh file instead to check for deltas

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# check that go lint passes or doesn't get worse by some threshold
echo running "$0"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# check a bunch of linters with the gometalinter
# TODO: run this from the test-golint.sh file instead to check for deltas

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
echo running "$0" "$@"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# check that go vet passes
echo running "$0"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# check that headers are properly formatted
echo running "$0"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# this file exists to that bash completion for test names works

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# check for any markdown files that aren't in an ideal format
echo running "$0 $*"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# check for any mcl files that aren't properly formatted
# TODO: this is hardly exhaustive

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# simple tests that don't deserve their own testfile
# library of utility functions

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# check that our modules still build, even if we don't run them here
# shellcheck disable=SC1091

View File

@@ -1,4 +1,4 @@
#!/bin/bash -i
#!/usr/bin/env -S bash -i
# simple test harness for testing mgmt via omv
echo running "$0"
CWD=`pwd`

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# simple test for reproducibility, probably needs major improvements
echo running "$0"
set -o errexit

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# simple test harness for testing mgmt
# NOTE: this will rm -rf /tmp/mgmt/

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# vet a few random things
echo running "$0"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# check for any yaml files that aren't properly formatted
exit 0 # i give up, we're skipping this entirely, help wanted to fix this

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# common settings and functions for test scripts