Browse code

Convert script shebangs from "#!/bin/bash" to "#!/usr/bin/env bash"

This is especially important for distributions like NixOS where `/bin/bash` doesn't exist, or for MacOS users who've installed a newer version of Bash than the one that comes with their OS.

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>

Tianon Gravi authored on 2017/02/14 04:01:54
Showing 88 changed files
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # This file is used to auto-generate Dockerfiles for making debs via 'make deb'
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # usage: ./generate.sh [versions]
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # usage: ./generate.sh [versions]
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e 
3 3
 
4 4
 cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # This file is used to auto-generate Dockerfiles for making debs via 'make deb'
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # This file is used to auto-generate Dockerfiles for making debs via 'make deb'
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # usage: ./generate.sh [versions]
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 # vim: set ts=4 sw=4 noet :
3 3
 
4 4
 set -e
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # usage: ./generate.sh [versions]
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 #
3 3
 # bash completion file for core docker commands
4 4
 #
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 #
3 3
 # This script installs the bundle to Docker Machine instances, for the purpose
4 4
 # of testing the latest Docker with Swarm mode enabled.
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # hello-world                      latest              ef872312fe1b        3 months ago        910 B
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -eo pipefail
3 3
 
4 4
 # hello-world                      latest              ef872312fe1b        3 months ago        910 B
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 #
4 4
 # This script generates a gitdm compatible email aliases file from a git
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 dir="$1"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 cd "$(dirname "$BASH_SOURCE")/../.."
... ...
@@ -1029,7 +1029,7 @@ the final executable receives the Unix signals by using `exec` and `gosu`
1029 1029
 commands:
1030 1030
 
1031 1031
 ```bash
1032
-#!/bin/bash
1032
+#!/usr/bin/env bash
1033 1033
 set -e
1034 1034
 
1035 1035
 if [ "$1" = 'postgres' ]; then
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # DinD: a wrapper script which allows docker to be run inside a docker container.
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 cd "$(dirname "$(readlink -f "$BASH_SOURCE")")/.."
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 BINARY_NAME="$BINARY_SHORT_NAME-$VERSION"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 DOCKER_CLIENT_BINARY_NAME='docker'
4 4
 DOCKER_DAEMON_BINARY_NAME='dockerd'
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 docker-version-osarch() {
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 if ! docker inspect -t image emptyfs &> /dev/null; then
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 rm -rf autogen
4 4
 
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 bundle .detect-daemon-osarch
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 # see test-integration-cli for example usage of this script
4 4
 
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 if [ ! "$(go env GOOS)" = 'windows' ]; then
4 4
 	trap - EXIT # reset EXIT trap applied in .integration-daemon-start
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 : ${TEST_REPEAT:=0}
4 4
 
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 rm -rf "$DEST"
4 4
 
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 [ -z "$KEEPDEST" ] && \
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 [ -z "$KEEPDEST" ] && \
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # subshell so that we can export PATH and TZ without breaking other things
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 rm -rf "$DEST"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # subshell so that we can export PATH and TZ without breaking other things
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # This script cleans the experimental pool for the apt repo.
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # This script cleans the experimental pool for the yum repo.
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 bundle_cover() {
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # explicit list of os/arch combos that support being a daemon
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # This script exists as backwards compatibility for CI
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 (
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 (
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # This script generates index files for the directory structure
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 set -e
4 4
 rm -rf "$DEST"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 set -e
4 4
 rm -rf "$DEST"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 set -e
4 4
 rm -rf "$DEST"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # This script modifies the install.sh script for domains and keys other than
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # This script creates the apt repos for the .deb files generated by hack/make/build-deb
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # This script creates the yum repos for the .rpm files generated by hack/make/build-rpm
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 set -e
4 4
 rm -rf "$DEST"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 # This script signs the deliverables from release-deb and release-rpm
4 4
 # with a designated GPG key.
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 # This script is used for testing install.sh and that it works for
3 3
 # each of component of our apt and yum repos
4 4
 set -e
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 source hack/make/.integration-test-helpers
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 # This script is used for testing install.sh and that it works for
3 3
 # each of component of our apt and yum repos
4 4
 set -e
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 source hack/make/.integration-test-helpers
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 bundle .integration-daemon-start
4 4
 bundle .integration-daemon-setup
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 versions=( 1.3.3 1.4.1 1.5.0 1.6.2 )
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # Run Docker's test suite, including sub-packages, and store their output as a bundle
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 CROSS="$DEST/../cross"
4 4
 
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 PKGVERSION="${VERSION//-/'~'}"
4 4
 # if we have a "-dev" suffix or have change in Git, let's make this package version more complex so it works better
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # This script updates the apt repo in $DOCKER_RELEASE_DIR/apt/repo.
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # explicit list of os/arch combos that support being a daemon
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 set -e -o pipefail
4 4
 
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 #
3 3
 # Run all validation
4 4
 
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 changelogFile=${1:-CHANGELOG.md}
4 4
 
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 changelogFile=${1:-CHANGELOG.md}
4 4
 
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4 4
 source "${SCRIPTDIR}/.validate"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4 4
 source "${SCRIPTDIR}/.validate"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 #
3 3
 # Run default validation, exclude vendor because it's slow
4 4
 
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4 4
 source "${SCRIPTDIR}/.validate"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4 4
 source "${SCRIPTDIR}/.validate"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4 4
 source "${SCRIPTDIR}/.validate"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4 4
 source "${SCRIPTDIR}/.validate"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4 4
 source "${SCRIPTDIR}/.validate"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 # Make sure we're not using gos' Testing package any more in integration-cli
3 3
 
4 4
 export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4 4
 source "${SCRIPTDIR}/.validate"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4 4
 source "${SCRIPTDIR}/.validate"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 export SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4 4
 source "${SCRIPTDIR}/.validate"
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 # This file is just wrapper around vndr (github.com/LK4D4/vndr) tool.
4 4
 # For updating dependencies you should change `vendor.conf` file in root of the
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 
3 3
 set -e
4 4
 
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 #
3 3
 # Generate man pages for docker/docker
4 4
 #
... ...
@@ -1,4 +1,4 @@
1
-#!/bin/bash
1
+#!/usr/bin/env bash
2 2
 set -e
3 3
 
4 4
 # get into this script's directory