diff --git a/Makefile b/Makefile index 5180710f..dc3a7873 100644 --- a/Makefile +++ b/Makefile @@ -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 art cleanart version program lang path deps run race generate build build-debug crossbuild clean test gofmt yamlfmt format docs .PHONY: rpmbuild mkdirs rpm srpm spec tar upload upload-sources upload-srpms upload-rpms upload-releases copr tag .PHONY: mkosi mkosi_fedora-latest mkosi_fedora-older mkosi_stream-latest mkosi_debian-stable mkosi_ubuntu-latest mkosi_archlinux diff --git a/docker/scripts/build b/docker/scripts/build index 1c35c5bc..d917d1a9 100755 --- a/docker/scripts/build +++ b/docker/scripts/build @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash script_directory="$( cd "$( dirname "$0" )" && pwd )" project_directory=$script_directory/../.. diff --git a/docker/scripts/build-development b/docker/scripts/build-development index 0e9cc556..eb4fbd46 100755 --- a/docker/scripts/build-development +++ b/docker/scripts/build-development @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Stop on any error set -e diff --git a/docker/scripts/exec-development b/docker/scripts/exec-development index 5bc93440..03bebdee 100755 --- a/docker/scripts/exec-development +++ b/docker/scripts/exec-development @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # runs command provided as argument inside a development (Linux) Docker container diff --git a/docker/scripts/run-development b/docker/scripts/run-development index 3d0bfa6f..d293eb98 100755 --- a/docker/scripts/run-development +++ b/docker/scripts/run-development @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Stop on any error set -e diff --git a/examples/dhcp_client/Makefile b/examples/dhcp_client/Makefile index 7659b539..76f2eb22 100644 --- a/examples/dhcp_client/Makefile +++ b/examples/dhcp_client/Makefile @@ -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: clean .SILENT: clean diff --git a/lang/Makefile b/lang/Makefile index 43ffede1..d501d9cd 100644 --- a/lang/Makefile +++ b/lang/Makefile @@ -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 fuzz all: build diff --git a/lang/core/embedded/provisioner/main.mcl b/lang/core/embedded/provisioner/main.mcl index ba8f2225..1b9ab414 100644 --- a/lang/core/embedded/provisioner/main.mcl +++ b/lang/core/embedded/provisioner/main.mcl @@ -794,7 +794,7 @@ class base:host($name, $config) { # passed into the provisioner. It's just now in a deploy subdir. # If it's a dir, then this becomes the empty strings. # XXX: The deploy could instead happen over the network to etcd. - "echo '#!/bin/bash' > ${firstboot_scripts_dir}mgmt-deploy.sh && echo '${handoff_binary_path} deploy lang --seeds=http://127.0.0.1:2379 --no-git --module-path=${deploy_dir_modules} ${deploy_dir}${handoff_code_chunk}' >> ${firstboot_scripts_dir}mgmt-deploy.sh && chmod u+x ${firstboot_scripts_dir}mgmt-deploy.sh" + "echo '#!/usr/bin/env bash' > ${firstboot_scripts_dir}mgmt-deploy.sh && echo '${handoff_binary_path} deploy lang --seeds=http://127.0.0.1:2379 --no-git --module-path=${deploy_dir_modules} ${deploy_dir}${handoff_code_chunk}' >> ${firstboot_scripts_dir}mgmt-deploy.sh && chmod u+x ${firstboot_scripts_dir}mgmt-deploy.sh" } # TODO: Do we want to signal an http:flag if we're a "default" host? diff --git a/lang/fuzz/Makefile b/lang/fuzz/Makefile index fb27a4a5..9e97bef3 100644 --- a/lang/fuzz/Makefile +++ b/lang/fuzz/Makefile @@ -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 fuzz all: fuzz diff --git a/misc/bashrc.sh b/misc/bashrc.sh index 5f96c07c..b4b7200f 100755 --- a/misc/bashrc.sh +++ b/misc/bashrc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash _cli_bash_autocomplete_mgmt() { local cur prev opts base diff --git a/misc/delta-cpu.sh b/misc/delta-cpu.sh index f0cafb81..4107c712 100755 --- a/misc/delta-cpu.sh +++ b/misc/delta-cpu.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # shitty cpu count control, useful for live demos minimum=1 # don't decrease below this number of cpus diff --git a/misc/fpm-pack.sh b/misc/fpm-pack.sh index 04d5bcd3..aafd6c78 100755 --- a/misc/fpm-pack.sh +++ b/misc/fpm-pack.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This script packages rpm, deb, and pacman packages of mgmt with fpm. The # first argument is the distro type, and the second argument is the version. All # subsequent arguments are the dependencies. diff --git a/misc/header.sh b/misc/header.sh index 7812c45c..8e26c98a 100755 --- a/misc/header.sh +++ b/misc/header.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [ "$1" = "" ] || [ "$1" = "--help" ]; then echo "usage: append standard header to file" diff --git a/misc/looper.sh b/misc/looper.sh index 562837e3..a301748f 100755 --- a/misc/looper.sh +++ b/misc/looper.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # simple test loop runner, eg: ./looper.sh make test-shell-exec-fail while true diff --git a/misc/make-baddev.sh b/misc/make-baddev.sh index 9079da97..db78099f 100755 --- a/misc/make-baddev.sh +++ b/misc/make-baddev.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Make a new "baddev" branch, start on whatever branch you want to base it on. git checkout -B baddev # scary -B reset the branch make diff --git a/misc/make-deb-changelog.sh b/misc/make-deb-changelog.sh index 03205ba7..ee9e2aac 100755 --- a/misc/make-deb-changelog.sh +++ b/misc/make-deb-changelog.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This script generates a deb changelog from the project's git history. # version we're releasing diff --git a/misc/make-deps.sh b/misc/make-deps.sh index 2337f5d0..b276e841 100755 --- a/misc/make-deps.sh +++ b/misc/make-deps.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # setup a simple golang environment XPWD=`pwd` ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )" # dir! diff --git a/misc/make-path.sh b/misc/make-path.sh index c88c4d92..e9aa707a 100755 --- a/misc/make-path.sh +++ b/misc/make-path.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # setup a few environment path values if ! env | grep -q '^GOPATH='; then diff --git a/misc/make-rpm-changelog.sh b/misc/make-rpm-changelog.sh index 5047a1b6..b94c4eff 100755 --- a/misc/make-rpm-changelog.sh +++ b/misc/make-rpm-changelog.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This script generates an rpm changelog from the project's git history. # version we're releasing diff --git a/misc/mgmt_debug.sh b/misc/mgmt_debug.sh index 41d96da9..19734117 100755 --- a/misc/mgmt_debug.sh +++ b/misc/mgmt_debug.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # This is a helper script to run mgmt and capture and filter stack traces. Any # time mgmt crashes with a trace, it will first be filtered, and then displayed diff --git a/misc/mkosi/Makefile b/misc/mkosi/Makefile index 0a62df21..a62c57ef 100644 --- a/misc/mkosi/Makefile +++ b/misc/mkosi/Makefile @@ -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 clean default: all diff --git a/misc/mkosi/make.sh b/misc/mkosi/make.sh index 6fc47a12..21ed8ccb 100755 --- a/misc/mkosi/make.sh +++ b/misc/mkosi/make.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e echo running "$0" set -o errexit diff --git a/misc/mkosi/mkosi.build b/misc/mkosi/mkosi.build index b2e72c91..eaa5f91a 100755 --- a/misc/mkosi/mkosi.build +++ b/misc/mkosi/mkosi.build @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # If mkosi.builddir/ exists mkosi will set $BUILDDIR to it, let's then use it as # out-of-tree build dir. Otherwise, let's make up our own builddir. diff --git a/misc/tag.sh b/misc/tag.sh index 34a22c03..14463a6b 100755 --- a/misc/tag.sh +++ b/misc/tag.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -eEu set -o pipefail diff --git a/misc/travis-encrypt.sh b/misc/travis-encrypt.sh index 39ecaa5d..72fb7f0d 100755 --- a/misc/travis-encrypt.sh +++ b/misc/travis-encrypt.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # modified slightly, originally from: # https://raw.githubusercontent.com/dlenski/travis-encrypt-sh/master/travis-encrypt diff --git a/misc/txtar-port.sh b/misc/txtar-port.sh index 016fb2f0..3a3d9db5 100644 --- a/misc/txtar-port.sh +++ b/misc/txtar-port.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # port tests to txtar for f in */main.mcl; do echo $f == $(dirname $f) diff --git a/run.sh b/run.sh index 02b06456..4a2f0347 100755 --- a/run.sh +++ b/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # simple way to kick off runs of the project, since 'go run' sucks! make build || exit 1 diff --git a/test.sh b/test.sh index 29ca8559..a8d78aca 100755 --- a/test.sh +++ b/test.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e # runs all (or selected) test suite(s) in test/ and aggregates results # Usage: # ./test.sh diff --git a/test/Makefile b/test/Makefile index c6efbc94..4d322c5c 100644 --- a/test/Makefile +++ b/test/Makefile @@ -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 diff --git a/test/shell/augeas-1.sh b/test/shell/augeas-1.sh index 65cd2067..9b675e6d 100755 --- a/test/shell/augeas-1.sh +++ b/test/shell/augeas-1.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e exit 0 # XXX: disable for now diff --git a/test/shell/embedded-provisioner.sh b/test/shell/embedded-provisioner.sh index f061cbd4..fd5a1ff9 100755 --- a/test/shell/embedded-provisioner.sh +++ b/test/shell/embedded-provisioner.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/env0.sh b/test/shell/env0.sh index bf72a094..1f277f29 100755 --- a/test/shell/env0.sh +++ b/test/shell/env0.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/etcd-clustersize.sh b/test/shell/etcd-clustersize.sh index 08668854..26f032b3 100755 --- a/test/shell/etcd-clustersize.sh +++ b/test/shell/etcd-clustersize.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . "$(dirname "$0")/../util.sh" diff --git a/test/shell/etcd-conflicting-server.sh b/test/shell/etcd-conflicting-server.sh index b11c4194..5ef6b893 100755 --- a/test/shell/etcd-conflicting-server.sh +++ b/test/shell/etcd-conflicting-server.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . "$(dirname "$0")/../util.sh" diff --git a/test/shell/etcd-three-hosts-reversed.sh b/test/shell/etcd-three-hosts-reversed.sh index 11a8301b..9d57521b 100755 --- a/test/shell/etcd-three-hosts-reversed.sh +++ b/test/shell/etcd-three-hosts-reversed.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/etcd-three-hosts.sh b/test/shell/etcd-three-hosts.sh index 1c6c5e7c..7b36b418 100755 --- a/test/shell/etcd-three-hosts.sh +++ b/test/shell/etcd-three-hosts.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/etcd-two-hosts-reversed.sh b/test/shell/etcd-two-hosts-reversed.sh index f28dc291..7f32a8ca 100755 --- a/test/shell/etcd-two-hosts-reversed.sh +++ b/test/shell/etcd-two-hosts-reversed.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/etcd-two-hosts.sh b/test/shell/etcd-two-hosts.sh index 9f38c1e0..cc1c7ac4 100755 --- a/test/shell/etcd-two-hosts.sh +++ b/test/shell/etcd-two-hosts.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/exchange.sh b/test/shell/exchange.sh index 7ed1376a..83228d98 100755 --- a/test/shell/exchange.sh +++ b/test/shell/exchange.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . "$(dirname "$0")/../util.sh" diff --git a/test/shell/exec-fail.sh b/test/shell/exec-fail.sh index ae7bcd01..9bdd5757 100755 --- a/test/shell/exec-fail.sh +++ b/test/shell/exec-fail.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/exec-usergroup.sh b/test/shell/exec-usergroup.sh index 040c1f8c..b1bdd9c7 100755 --- a/test/shell/exec-usergroup.sh +++ b/test/shell/exec-usergroup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . "$(dirname "$0")/../util.sh" diff --git a/test/shell/file-mode.sh b/test/shell/file-mode.sh index 6dc0a258..113558dc 100755 --- a/test/shell/file-mode.sh +++ b/test/shell/file-mode.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e exit 0 # XXX: disable for now diff --git a/test/shell/file-move-upper-dir.sh b/test/shell/file-move-upper-dir.sh index 31feeb8b..c98db02d 100755 --- a/test/shell/file-move-upper-dir.sh +++ b/test/shell/file-move-upper-dir.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e # FIXME: test for #124 --- Disabled for now diff --git a/test/shell/file-move.sh b/test/shell/file-move.sh index 249ea44d..bb00b0a4 100755 --- a/test/shell/file-move.sh +++ b/test/shell/file-move.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e exit 0 # XXX: disable for now diff --git a/test/shell/file-owner.sh b/test/shell/file-owner.sh index 025b6796..673469a3 100755 --- a/test/shell/file-owner.sh +++ b/test/shell/file-owner.sh @@ -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 diff --git a/test/shell/file-source.sh b/test/shell/file-source.sh index f93ff9b1..ce94f9be 100755 --- a/test/shell/file-source.sh +++ b/test/shell/file-source.sh @@ -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" diff --git a/test/shell/graph-exit1.sh b/test/shell/graph-exit1.sh index e343c1d2..15c180ec 100755 --- a/test/shell/graph-exit1.sh +++ b/test/shell/graph-exit1.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/graph-exit2.sh b/test/shell/graph-exit2.sh index d192bb49..4df011bf 100755 --- a/test/shell/graph-exit2.sh +++ b/test/shell/graph-exit2.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/graph-fanin-1.sh b/test/shell/graph-fanin-1.sh index 07288b08..26a8a61b 100755 --- a/test/shell/graph-fanin-1.sh +++ b/test/shell/graph-fanin-1.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/ipv6-localhost.sh b/test/shell/ipv6-localhost.sh index 10e8acb3..6b9befb4 100755 --- a/test/shell/ipv6-localhost.sh +++ b/test/shell/ipv6-localhost.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . "$(dirname "$0")/../util.sh" diff --git a/test/shell/libmgmt-change1.sh b/test/shell/libmgmt-change1.sh index 9eb15299..9da2f2ae 100755 --- a/test/shell/libmgmt-change1.sh +++ b/test/shell/libmgmt-change1.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/libmgmt-change2.sh b/test/shell/libmgmt-change2.sh index 0554d412..c50867b1 100755 --- a/test/shell/libmgmt-change2.sh +++ b/test/shell/libmgmt-change2.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/load0.sh b/test/shell/load0.sh index 7010314e..9857cca8 100755 --- a/test/shell/load0.sh +++ b/test/shell/load0.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/net.sh b/test/shell/net.sh index b25b428a..2f8ff010 100755 --- a/test/shell/net.sh +++ b/test/shell/net.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/no-network.sh b/test/shell/no-network.sh index 454d6ee4..b3b067d7 100755 --- a/test/shell/no-network.sh +++ b/test/shell/no-network.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash . "$(dirname "$0")/../util.sh" diff --git a/test/shell/prometheus-1.sh b/test/shell/prometheus-1.sh index 8ed9127d..d327c8d8 100755 --- a/test/shell/prometheus-1.sh +++ b/test/shell/prometheus-1.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/prometheus-2.sh b/test/shell/prometheus-2.sh index 7356abf9..236c5829 100755 --- a/test/shell/prometheus-2.sh +++ b/test/shell/prometheus-2.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/prometheus-3.sh b/test/shell/prometheus-3.sh index 5a34d9b5..37df508c 100755 --- a/test/shell/prometheus-3.sh +++ b/test/shell/prometheus-3.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/prometheus-4.sh b/test/shell/prometheus-4.sh index f8b36047..d1250c32 100755 --- a/test/shell/prometheus-4.sh +++ b/test/shell/prometheus-4.sh @@ -1,4 +1,4 @@ -#!/bin/bash -xe +#!/usr/bin/env -S bash -xe . "$(dirname "$0")/../util.sh" diff --git a/test/shell/sema-1.sh b/test/shell/sema-1.sh index 7eb725a0..e6e26eaa 100755 --- a/test/shell/sema-1.sh +++ b/test/shell/sema-1.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/sema-2.sh b/test/shell/sema-2.sh index a3a0e977..7017d16f 100755 --- a/test/shell/sema-2.sh +++ b/test/shell/sema-2.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/t1.sh b/test/shell/t1.sh index de005634..8c65ba11 100755 --- a/test/shell/t1.sh +++ b/test/shell/t1.sh @@ -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 diff --git a/test/shell/t2.sh b/test/shell/t2.sh index 10882fed..2c0f410e 100755 --- a/test/shell/t2.sh +++ b/test/shell/t2.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/t3.sh b/test/shell/t3.sh index b8fe2e9b..591be50e 100755 --- a/test/shell/t3.sh +++ b/test/shell/t3.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/t5.sh b/test/shell/t5.sh index 1ab5a7e3..acbb40a8 100755 --- a/test/shell/t5.sh +++ b/test/shell/t5.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/t5b.sh b/test/shell/t5b.sh index 14e03874..01d8fb8a 100755 --- a/test/shell/t5b.sh +++ b/test/shell/t5b.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/t6.sh b/test/shell/t6.sh index 92bc07c3..406e18ce 100755 --- a/test/shell/t6.sh +++ b/test/shell/t6.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/t7.sh b/test/shell/t7.sh index df8fa73f..b39d4c6c 100755 --- a/test/shell/t7.sh +++ b/test/shell/t7.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/shell/yaml-change1.sh b/test/shell/yaml-change1.sh index ee1dd104..f3b93dc6 100755 --- a/test/shell/yaml-change1.sh +++ b/test/shell/yaml-change1.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e . "$(dirname "$0")/../util.sh" diff --git a/test/test-bashfmt.sh b/test/test-bashfmt.sh index 2a3838d0..d3d2e90a 100755 --- a/test/test-bashfmt.sh +++ b/test/test-bashfmt.sh @@ -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 diff --git a/test/test-commit-message.sh b/test/test-commit-message.sh index f44b2977..0f108191 100755 --- a/test/test-commit-message.sh +++ b/test/test-commit-message.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/usr/bin/env -S bash -e # tests if commit message conforms to convention # library of utility functions diff --git a/test/test-crossbuild.sh b/test/test-crossbuild.sh index 066056bc..bb21a363 100755 --- a/test/test-crossbuild.sh +++ b/test/test-crossbuild.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e -o pipefail diff --git a/test/test-docs-generate.sh b/test/test-docs-generate.sh index 9098e3ad..49b9dd61 100755 --- a/test/test-docs-generate.sh +++ b/test/test-docs-generate.sh @@ -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 diff --git a/test/test-examples.sh b/test/test-examples.sh index 36d03b60..9c0e4c3a 100755 --- a/test/test-examples.sh +++ b/test/test-examples.sh @@ -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 diff --git a/test/test-gofmt.sh b/test/test-gofmt.sh index 86071742..9e4b49e7 100755 --- a/test/test-gofmt.sh +++ b/test/test-gofmt.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # original version of this script from kubernetes project, under ALv2 license echo running "$0" diff --git a/test/test-golangci-lint.sh b/test/test-golangci-lint.sh index 378d613a..9a6a971a 100755 --- a/test/test-golangci-lint.sh +++ b/test/test-golangci-lint.sh @@ -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 diff --git a/test/test-golint.sh b/test/test-golint.sh index 325c756d..0db74dc8 100755 --- a/test/test-golint.sh +++ b/test/test-golint.sh @@ -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" diff --git a/test/test-gometalinter.sh b/test/test-gometalinter.sh index 327b999e..cdcd06b6 100755 --- a/test/test-gometalinter.sh +++ b/test/test-gometalinter.sh @@ -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 diff --git a/test/test-gotest.sh b/test/test-gotest.sh index d8731b4d..2e87322d 100755 --- a/test/test-gotest.sh +++ b/test/test-gotest.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash echo running "$0" "$@" diff --git a/test/test-govet.sh b/test/test-govet.sh index ad8a654a..343088ba 100755 --- a/test/test-govet.sh +++ b/test/test-govet.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # check that go vet passes echo running "$0" diff --git a/test/test-headerfmt.sh b/test/test-headerfmt.sh index f7a99a2e..0be29876 100755 --- a/test/test-headerfmt.sh +++ b/test/test-headerfmt.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # check that headers are properly formatted echo running "$0" diff --git a/test/test-integration.sh b/test/test-integration.sh index c0ead351..19daa955 100755 --- a/test/test-integration.sh +++ b/test/test-integration.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # this file exists to that bash completion for test names works diff --git a/test/test-markdownlint.sh b/test/test-markdownlint.sh index 62d5b26e..477f4c17 100755 --- a/test/test-markdownlint.sh +++ b/test/test-markdownlint.sh @@ -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 $*" diff --git a/test/test-mclfmt.sh b/test/test-mclfmt.sh index 30184ee4..f1249c1d 100755 --- a/test/test-mclfmt.sh +++ b/test/test-mclfmt.sh @@ -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 diff --git a/test/test-misc.sh b/test/test-misc.sh index ad06759e..24ab64bc 100755 --- a/test/test-misc.sh +++ b/test/test-misc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # simple tests that don't deserve their own testfile # library of utility functions diff --git a/test/test-modules.sh b/test/test-modules.sh index 28dd2de8..9ee9a775 100755 --- a/test/test-modules.sh +++ b/test/test-modules.sh @@ -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 diff --git a/test/test-omv.sh b/test/test-omv.sh index 57e627be..5b29a7bb 100755 --- a/test/test-omv.sh +++ b/test/test-omv.sh @@ -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` diff --git a/test/test-reproducible.sh b/test/test-reproducible.sh index 3e9c9f4d..bc1ef8cc 100755 --- a/test/test-reproducible.sh +++ b/test/test-reproducible.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # simple test for reproducibility, probably needs major improvements echo running "$0" set -o errexit diff --git a/test/test-shell.sh b/test/test-shell.sh index acc071b7..adaad269 100755 --- a/test/test-shell.sh +++ b/test/test-shell.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # simple test harness for testing mgmt # NOTE: this will rm -rf /tmp/mgmt/ diff --git a/test/test-vet.sh b/test/test-vet.sh index c2891034..edc5797f 100755 --- a/test/test-vet.sh +++ b/test/test-vet.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # vet a few random things echo running "$0" diff --git a/test/test-yamlfmt.sh b/test/test-yamlfmt.sh index 037d998b..676b6632 100755 --- a/test/test-yamlfmt.sh +++ b/test/test-yamlfmt.sh @@ -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 diff --git a/test/util.sh b/test/util.sh index 18c640fe..95e2a184 100755 --- a/test/util.sh +++ b/test/util.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # common settings and functions for test scripts