Skip to content

Commit f186bac

Browse files
karpfediempurpleidea
authored andcommitted
misc: Use env to find bash
Note from purpleidea: I'm definitely not a nix user, but I guess it's okay to make some of them happy. My personal ~bin/ uses #!/bin/bash forever.
1 parent 87d8533 commit f186bac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+85
-85
lines changed

docker/scripts/build

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
script_directory="$( cd "$( dirname "$0" )" && pwd )"
44
project_directory=$script_directory/../..

docker/scripts/build-development

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Stop on any error
44
set -e

docker/scripts/exec-development

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# runs command provided as argument inside a development (Linux) Docker container
44

docker/scripts/run-development

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# Stop on any error
44
set -e

lang/core/embedded/provisioner/main.mcl

+1-1
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ class base:host($name, $config) {
794794
# passed into the provisioner. It's just now in a deploy subdir.
795795
# If it's a dir, then this becomes the empty strings.
796796
# XXX: The deploy could instead happen over the network to etcd.
797-
"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"
797+
"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"
798798
}
799799

800800
# TODO: Do we want to signal an http:flag if we're a "default" host?

misc/bashrc.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
_cli_bash_autocomplete_mgmt() {
44
local cur prev opts base

misc/delta-cpu.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# shitty cpu count control, useful for live demos
33

44
minimum=1 # don't decrease below this number of cpus

misc/fpm-pack.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# This script packages rpm, deb, and pacman packages of mgmt with fpm. The
33
# first argument is the distro type, and the second argument is the version. All
44
# subsequent arguments are the dependencies.

misc/header.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
if [ "$1" = "" ] || [ "$1" = "--help" ]; then
44
echo "usage: append standard header to file"

misc/looper.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# simple test loop runner, eg: ./looper.sh make test-shell-exec-fail
33

44
while true

misc/make-deb-changelog.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# This script generates a deb changelog from the project's git history.
33

44
# version we're releasing

misc/make-deps.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# setup a simple golang environment
33
XPWD=`pwd`
44
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )" # dir!

misc/make-path.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# setup a few environment path values
33

44
if ! env | grep -q '^GOPATH='; then

misc/make-rpm-changelog.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# This script generates an rpm changelog from the project's git history.
33

44
# version we're releasing

misc/mgmt_debug.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# This is a helper script to run mgmt and capture and filter stack traces. Any
44
# time mgmt crashes with a trace, it will first be filtered, and then displayed

misc/mkosi/make.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
echo running "$0"
44
set -o errexit

misc/mkosi/mkosi.build

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# If mkosi.builddir/ exists mkosi will set $BUILDDIR to it, let's then use it as
44
# out-of-tree build dir. Otherwise, let's make up our own builddir.

misc/tag.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -eEu
33
set -o pipefail
44

misc/travis-encrypt.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# modified slightly, originally from:
33
# https://raw.githubusercontent.com/dlenski/travis-encrypt-sh/master/travis-encrypt
44

misc/txtar-port.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# port tests to txtar
33
for f in */main.mcl; do
44
echo $f == $(dirname $f)

run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# simple way to kick off runs of the project, since 'go run' sucks!
44
make build || exit 1

test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22
# runs all (or selected) test suite(s) in test/ and aggregates results
33
# Usage:
44
# ./test.sh

test/shell/augeas-1.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
exit 0 # XXX: disable for now
44

test/shell/embedded-provisioner.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/env0.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/etcd-clustersize.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/etcd-conflicting-server.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/etcd-three-hosts-reversed.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/etcd-three-hosts.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/etcd-two-hosts-reversed.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/etcd-two-hosts.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/exchange.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/exec-fail.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/exec-usergroup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/file-mode.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
exit 0 # XXX: disable for now
44

test/shell/file-move-upper-dir.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
# FIXME: test for #124 --- Disabled for now
44

test/shell/file-move.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
exit 0 # XXX: disable for now
44

test/shell/file-owner.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22
# vim: noet:ts=8:sts=8:sw=8
33

44
exit 0 # XXX: disable for now

test/shell/file-source.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22
# vim: noet:ts=8:sts=8:sw=8
33

44
. "$(dirname "$0")/../util.sh"

test/shell/graph-exit1.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/graph-exit2.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/graph-fanin-1.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/ipv6-localhost.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/libmgmt-change1.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/libmgmt-change2.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/load0.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/net.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/no-network.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/prometheus-1.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/prometheus-2.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/prometheus-3.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/prometheus-4.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -xe
1+
#!/usr/bin/env bash -xe
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/sema-1.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/sema-2.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/t1.sh

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

test/shell/t2.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/t3.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/t5.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/t5b.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/t6.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/t7.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/shell/yaml-change1.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22

33
. "$(dirname "$0")/../util.sh"
44

test/test-bashfmt.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# check for any bash files that aren't properly formatted
33
# TODO: this is hardly exhaustive
44

test/test-commit-message.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash -e
1+
#!/usr/bin/env bash -e
22
# tests if commit message conforms to convention
33

44
# library of utility functions

test/test-crossbuild.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
set -e -o pipefail
44

test/test-docs-generate.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# check that our documentation still generates, even if we don't use it here
33

44
# shellcheck disable=SC1091

0 commit comments

Comments
 (0)