Skip to content

Commit

Permalink
fix: use /usr/bin/env bash instead of direct /bin/bash in scripts (dd…
Browse files Browse the repository at this point in the history
…ev#6706) [skip ci]
  • Loading branch information
rfay authored Nov 11, 2024
1 parent 9aa0fc2 commit bc33850
Show file tree
Hide file tree
Showing 148 changed files with 152 additions and 152 deletions.
2 changes: 1 addition & 1 deletion .buildkite/nfstest.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -o errexit
set -o pipefail
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/sanetestbot.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Check a testbot or test environment to make sure it's likely to be sane.
# We should add to this script whenever a testbot fails and we can figure out why.
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# This script is used to build ddev/ddev using buildkite

set -eu -o pipefail
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/test_containers.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Runs "make test" in each container directory

Expand Down
2 changes: 1 addition & 1 deletion .buildkite/testbot_maintenance.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eu -o pipefail

Expand Down
2 changes: 1 addition & 1 deletion .ci-scripts/bump_aur.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Requires $AUR_SSH_PRIVATE_KEY, a private key in environment variable
# This environment variable must be a single line, with \n replaced by "<SPLIT>"
Expand Down
2 changes: 1 addition & 1 deletion .ci-scripts/bump_homebrew.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Requires $DDEV_GITHUB_TOKEN, a token with public repo power

Expand Down
2 changes: 1 addition & 1 deletion .ci-scripts/generate_artifacts.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# This script builds ddev artifacts and their sha256 hashes.
# First arg is the artifact directory

Expand Down
2 changes: 1 addition & 1 deletion .ci-scripts/nsis_setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Set up nsis after it's installed
# $1 should be the target directory where nsis is
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/setup_test_project.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eu -o pipefail

Expand Down
2 changes: 1 addition & 1 deletion .githooks/linkallchecks.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -o errexit
set -o pipefail
Expand Down
2 changes: 1 addition & 1 deletion .githooks/linkgofmt.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -o errexit
set -o pipefail
Expand Down
2 changes: 1 addition & 1 deletion .githooks/pre-push.allchecks
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh

# Look for uncommitted files, http://stackoverflow.com/a/2659808/215713
git diff-index --quiet HEAD || (echo "There are uncommitted files" && exit 1)
Expand Down
2 changes: 1 addition & 1 deletion .githooks/pre-push.gofmt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -o errexit

# Look for uncommitted files, http://stackoverflow.com/a/2659808/215713
Expand Down
2 changes: 1 addition & 1 deletion .githooks/unlinkprepush.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -o errexit
set -o pipefail
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nfstest.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -o errexit
set -o pipefail
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sanetestbot.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Check a testbot or test environment to make sure it's likely to be sane.
# We should add to this script whenever a testbot fails and we can figure out why.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/selfhosted-maintenance.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash


set -o errexit
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/selfhosted-upgrades.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eu

Expand Down
2 changes: 1 addition & 1 deletion cmd/ddev/cmd/scripts/test_ddev.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

#ddev-generated
# Please run this script with "bash test_ddev.sh"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## Description: global-host-cmd
## Usage: global-host-cmd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## Description: global-web-cmd
## Usage: global-web-cmd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## Description: project-host-cmd
## Usage: project-host-cmd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## Description: project-web-cmd
## Usage: project-web-cmd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

ARGS=("$@")
# prepend host name to args
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## Description: global-host-cmd
## Usage: global-host-cmd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

ARGS=("$@")
# prepend host name to args
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## Description: global-web-cmd
## Usage: global-web-cmd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

ARGS=("$@")
# prepend host name to args
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## Description: project-host-cmd
## Usage: project-host-cmd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

ARGS=("$@")
# prepend host name to args
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## Description: project-web-cmd
## Usage: project-web-cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/ddev/cmd/testdata/TestCmdAuthSSH/ddevauthssh.expect
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env expect -f
#!/usr/bin/env -S expect -f

set ddevpath [lindex $argv 0];
set keypath [lindex $argv 1];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## Description: not-a-command global
## Usage: not-a-command
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## Description: testhostcmd global
## Usage: testhostcmd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## Description: testhostglobal global
## Usage: testhostglobal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## Description: testhostglobal-noproject global
## Usage: testhostglobal-noproject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## Description: testwebcmd global
## Usage: testwebcmd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## Description: testwebglobal global
## Usage: testwebglobal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## Description: testhostcmd project
## Usage: testhostcmd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## Description: testhostcmdflags project
## Usage: testhostcmdflags
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## Description: testwebcmd project
## Usage: testwebcmd
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
#!/usr/bin/env bash

echo "this is .globalscript.sh"
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
#!/usr/bin/env bash

echo "this is global .myscript.sh"
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
#!/usr/bin/env bash

echo "this is project .myscript.sh"
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
#!/usr/bin/env bash

echo "this is .projectscript.sh"
2 changes: 1 addition & 1 deletion containers/ddev-dbserver/build_image.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Build a ddev-dbserver image for variety of mariadb/mysql
# and per architecture, optionally push
Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-dbserver/files/create_base_db.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eu
set -o pipefail
Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-dbserver/files/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -x
set -eu
set -o pipefail
Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-dbserver/files/healthcheck.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## mysql health check for docker

Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-dbserver/test/functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

SKIP_SSL="--skip-ssl"
if mysql --help | grep -q -v -- '--skip-ssl'; then SKIP_SSL=""; fi
Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-dbserver/test/test_dbserver.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Find the directory of this script
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-gitpod-base/test/containertest.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -o errexit
set -o pipefail
Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-nginx-proxy-router/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eu -o pipefail

rm -f /tmp/healthy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# This gets preprocessed by docker-gen into a script which generates needed
# mkcert certs and updates the nginx configs for all projects
Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-nginx-proxy-router/healthcheck.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eu
set -o pipefail

Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-nginx-proxy-router/test/containertest.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -o errexit
set -o pipefail
Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-nginx-proxy-router/testtools/testgen.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Test ddev.conf generation for https://github.com/ddev/ddev/issues/2648

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eu -o pipefail

Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-ssh-agent/files/entry.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright (c) Andreas Urbanski, 2018
#
# Permission is hereby granted, free of charge, to any person obtaining a
Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-ssh-agent/files/healthcheck.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# ddev-ssh-agent healthcheck

Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-ssh-agent/run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Copyright (c) Andreas Urbanski, 2016
#
# Permission is hereby granted, free of charge, to any person obtaining a
Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-ssh-agent/test/functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

function basic_setup {
export CONTAINER_NAME="testserver"
Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-ssh-agent/test/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Find the directory of this script
export DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-traefik-router/test/containertest.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -o errexit
set -o pipefail
Expand Down
2 changes: 1 addition & 1 deletion containers/ddev-traefik-router/traefik_healthcheck.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

## traefik health check
set -eu -o pipefail
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
export PATH=$PATH:/usr/sbin:/sbin
phpdismod xdebug
killall -USR2 php-fpm 2>/dev/null || true
Expand Down
Loading

0 comments on commit bc33850

Please sign in to comment.