Skip to content

Commit

Permalink
Convert script shebangs from "#!/bin/bash" to "#!/usr/bin/env bash"
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tianon committed Feb 13, 2017
1 parent 5870675 commit 52379fa
Show file tree
Hide file tree
Showing 88 changed files with 88 additions and 88 deletions.
2 changes: 1 addition & 1 deletion contrib/builder/deb/aarch64/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
Expand Down
2 changes: 1 addition & 1 deletion contrib/builder/deb/aarch64/generate.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# This file is used to auto-generate Dockerfiles for making debs via 'make deb'
Expand Down
2 changes: 1 addition & 1 deletion contrib/builder/deb/amd64/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
Expand Down
2 changes: 1 addition & 1 deletion contrib/builder/deb/amd64/generate.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# usage: ./generate.sh [versions]
Expand Down
2 changes: 1 addition & 1 deletion contrib/builder/deb/armhf/generate.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# usage: ./generate.sh [versions]
Expand Down
2 changes: 1 addition & 1 deletion contrib/builder/deb/ppc64le/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
Expand Down
2 changes: 1 addition & 1 deletion contrib/builder/deb/ppc64le/generate.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# This file is used to auto-generate Dockerfiles for making debs via 'make deb'
Expand Down
2 changes: 1 addition & 1 deletion contrib/builder/deb/s390x/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
Expand Down
2 changes: 1 addition & 1 deletion contrib/builder/deb/s390x/generate.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# This file is used to auto-generate Dockerfiles for making debs via 'make deb'
Expand Down
2 changes: 1 addition & 1 deletion contrib/builder/rpm/amd64/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
Expand Down
2 changes: 1 addition & 1 deletion contrib/builder/rpm/amd64/generate.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# usage: ./generate.sh [versions]
Expand Down
2 changes: 1 addition & 1 deletion contrib/builder/rpm/armhf/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
Expand Down
2 changes: 1 addition & 1 deletion contrib/builder/rpm/armhf/generate.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# vim: set ts=4 sw=4 noet :

set -e
Expand Down
2 changes: 1 addition & 1 deletion contrib/builder/rpm/ppc64le/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
Expand Down
2 changes: 1 addition & 1 deletion contrib/builder/rpm/ppc64le/generate.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# usage: ./generate.sh [versions]
Expand Down
2 changes: 1 addition & 1 deletion contrib/completion/bash/docker
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# bash completion file for core docker commands
#
Expand Down
2 changes: 1 addition & 1 deletion contrib/docker-machine-install-bundle.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# This script installs the bundle to Docker Machine instances, for the purpose
# of testing the latest Docker with Swarm mode enabled.
Expand Down
2 changes: 1 addition & 1 deletion contrib/download-frozen-image-v1.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# hello-world latest ef872312fe1b 3 months ago 910 B
Expand Down
2 changes: 1 addition & 1 deletion contrib/download-frozen-image-v2.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eo pipefail

# hello-world latest ef872312fe1b 3 months ago 910 B
Expand Down
2 changes: 1 addition & 1 deletion contrib/gitdm/generate_aliases.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

#
# This script generates a gitdm compatible email aliases file from a git
Expand Down
2 changes: 1 addition & 1 deletion contrib/nuke-graph-directory.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

dir="$1"
Expand Down
2 changes: 1 addition & 1 deletion contrib/reprepro/suites.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

cd "$(dirname "$BASH_SOURCE")/../.."
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ the final executable receives the Unix signals by using `exec` and `gosu`
commands:

```bash
#!/bin/bash
#!/usr/bin/env bash
set -e

if [ "$1" = 'postgres' ]; then
Expand Down
2 changes: 1 addition & 1 deletion hack/dind
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# DinD: a wrapper script which allows docker to be run inside a docker container.
Expand Down
2 changes: 1 addition & 1 deletion hack/generate-authors.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

cd "$(dirname "$(readlink -f "$BASH_SOURCE")")/.."
Expand Down
2 changes: 1 addition & 1 deletion hack/make/.binary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

BINARY_NAME="$BINARY_SHORT_NAME-$VERSION"
Expand Down
2 changes: 1 addition & 1 deletion hack/make/.binary-setup
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

DOCKER_CLIENT_BINARY_NAME='docker'
DOCKER_DAEMON_BINARY_NAME='dockerd'
Expand Down
2 changes: 1 addition & 1 deletion hack/make/.detect-daemon-osarch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

docker-version-osarch() {
Expand Down
2 changes: 1 addition & 1 deletion hack/make/.ensure-emptyfs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

if ! docker inspect -t image emptyfs &> /dev/null; then
Expand Down
2 changes: 1 addition & 1 deletion hack/make/.go-autogen
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

rm -rf autogen

Expand Down
2 changes: 1 addition & 1 deletion hack/make/.integration-daemon-setup
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

bundle .detect-daemon-osarch
Expand Down
2 changes: 1 addition & 1 deletion hack/make/.integration-daemon-start
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# see test-integration-cli for example usage of this script

Expand Down
2 changes: 1 addition & 1 deletion hack/make/.integration-daemon-stop
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if [ ! "$(go env GOOS)" = 'windows' ]; then
trap - EXIT # reset EXIT trap applied in .integration-daemon-start
Expand Down
2 changes: 1 addition & 1 deletion hack/make/.integration-test-helpers
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

: ${TEST_REPEAT:=0}

Expand Down
2 changes: 1 addition & 1 deletion hack/make/binary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e
rm -rf "$DEST"

Expand Down
2 changes: 1 addition & 1 deletion hack/make/binary-client
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

[ -z "$KEEPDEST" ] && \
Expand Down
2 changes: 1 addition & 1 deletion hack/make/binary-daemon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

[ -z "$KEEPDEST" ] && \
Expand Down
2 changes: 1 addition & 1 deletion hack/make/build-deb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# subshell so that we can export PATH and TZ without breaking other things
Expand Down
2 changes: 1 addition & 1 deletion hack/make/build-integration-test-binary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

rm -rf "$DEST"
Expand Down
2 changes: 1 addition & 1 deletion hack/make/build-rpm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# subshell so that we can export PATH and TZ without breaking other things
Expand Down
2 changes: 1 addition & 1 deletion hack/make/clean-apt-repo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# This script cleans the experimental pool for the apt repo.
Expand Down
2 changes: 1 addition & 1 deletion hack/make/clean-yum-repo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# This script cleans the experimental pool for the yum repo.
Expand Down
2 changes: 1 addition & 1 deletion hack/make/cover
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

bundle_cover() {
Expand Down
2 changes: 1 addition & 1 deletion hack/make/cross
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# explicit list of os/arch combos that support being a daemon
Expand Down
2 changes: 1 addition & 1 deletion hack/make/dynbinary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# This script exists as backwards compatibility for CI
Expand Down
2 changes: 1 addition & 1 deletion hack/make/dynbinary-client
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

(
Expand Down
2 changes: 1 addition & 1 deletion hack/make/dynbinary-daemon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

(
Expand Down
2 changes: 1 addition & 1 deletion hack/make/generate-index-listing
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# This script generates index files for the directory structure
Expand Down
2 changes: 1 addition & 1 deletion hack/make/install-binary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e
rm -rf "$DEST"
Expand Down
2 changes: 1 addition & 1 deletion hack/make/install-binary-client
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e
rm -rf "$DEST"
Expand Down
2 changes: 1 addition & 1 deletion hack/make/install-binary-daemon
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e
rm -rf "$DEST"
Expand Down
2 changes: 1 addition & 1 deletion hack/make/install-script
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# This script modifies the install.sh script for domains and keys other than
Expand Down
2 changes: 1 addition & 1 deletion hack/make/release-deb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# This script creates the apt repos for the .deb files generated by hack/make/build-deb
Expand Down
2 changes: 1 addition & 1 deletion hack/make/release-rpm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# This script creates the yum repos for the .rpm files generated by hack/make/build-rpm
Expand Down
2 changes: 1 addition & 1 deletion hack/make/run
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e
rm -rf "$DEST"
Expand Down
2 changes: 1 addition & 1 deletion hack/make/sign-repos
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# This script signs the deliverables from release-deb and release-rpm
# with a designated GPG key.
Expand Down
2 changes: 1 addition & 1 deletion hack/make/test-deb-install
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# This script is used for testing install.sh and that it works for
# each of component of our apt and yum repos
set -e
Expand Down
2 changes: 1 addition & 1 deletion hack/make/test-docker-py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

source hack/make/.integration-test-helpers
Expand Down
2 changes: 1 addition & 1 deletion hack/make/test-install-script
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# This script is used for testing install.sh and that it works for
# each of component of our apt and yum repos
set -e
Expand Down
2 changes: 1 addition & 1 deletion hack/make/test-integration-cli
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

source hack/make/.integration-test-helpers
Expand Down
2 changes: 1 addition & 1 deletion hack/make/test-integration-shell
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

bundle .integration-daemon-start
bundle .integration-daemon-setup
Expand Down
2 changes: 1 addition & 1 deletion hack/make/test-old-apt-repo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

versions=( 1.3.3 1.4.1 1.5.0 1.6.2 )
Expand Down
2 changes: 1 addition & 1 deletion hack/make/test-unit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# Run Docker's test suite, including sub-packages, and store their output as a bundle
Expand Down
2 changes: 1 addition & 1 deletion hack/make/tgz
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

CROSS="$DEST/../cross"

Expand Down
2 changes: 1 addition & 1 deletion hack/make/ubuntu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

PKGVERSION="${VERSION//-/'~'}"
# if we have a "-dev" suffix or have change in Git, let's make this package version more complex so it works better
Expand Down
2 changes: 1 addition & 1 deletion hack/make/update-apt-repo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# This script updates the apt repo in $DOCKER_RELEASE_DIR/apt/repo.
Expand Down
Loading

0 comments on commit 52379fa

Please sign in to comment.