From 6ccc92e47e288a48cb1929083e12905990379442 Mon Sep 17 00:00:00 2001 From: vdot0x23 <40716069+vdot0x23@users.noreply.github.com> Date: Thu, 18 Jun 2020 07:49:13 +0000 Subject: [PATCH] do not hardcode /bin/bash (#1122) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Victor Büttner Co-authored-by: Clément Michaud --- .buildkite/deployment.sh | 2 +- .buildkite/hooks/post-checkout | 2 +- .buildkite/hooks/post-command | 2 +- .buildkite/hooks/pre-artifact | 2 +- .buildkite/hooks/pre-command | 2 +- .buildkite/hooks/pre-exit | 2 +- .buildkite/pipeline.sh | 2 +- .buildkite/steps/aurhelper.sh | 2 +- .buildkite/steps/aurpackages.sh | 2 +- .buildkite/steps/buildimages.sh | 2 +- .buildkite/steps/deployimages.sh | 2 +- .buildkite/steps/e2etests.sh | 2 +- .buildkite/steps/ghartifacts.sh | 2 +- .buildkite/steps/syncdoc.sh | 2 +- bootstrap.sh | 2 +- cmd/authelia-scripts/authelia-scripts | 2 +- compose/local/setup.sh | 2 +- internal/suites/example/compose/kind/entrypoint-dashboard.sh | 2 +- internal/suites/example/kube/bootstrap-dashboard.sh | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.buildkite/deployment.sh b/.buildkite/deployment.sh index e2ce8d46a..9f732b5f7 100755 --- a/.buildkite/deployment.sh +++ b/.buildkite/deployment.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -u DIVERGED=$(git merge-base --fork-point origin/master > /dev/null; echo $?) diff --git a/.buildkite/hooks/post-checkout b/.buildkite/hooks/post-checkout index 47151246d..8c77838d7 100755 --- a/.buildkite/hooks/post-checkout +++ b/.buildkite/hooks/post-checkout @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set +u diff --git a/.buildkite/hooks/post-command b/.buildkite/hooks/post-command index 97af6dc6d..b93d09d0b 100755 --- a/.buildkite/hooks/post-command +++ b/.buildkite/hooks/post-command @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set +u diff --git a/.buildkite/hooks/pre-artifact b/.buildkite/hooks/pre-artifact index a9f62a4da..f2b230d89 100755 --- a/.buildkite/hooks/pre-artifact +++ b/.buildkite/hooks/pre-artifact @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set +u diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index 2c1a6c514..0c7cf6da3 100755 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set +u diff --git a/.buildkite/hooks/pre-exit b/.buildkite/hooks/pre-exit index 8224e4146..169152b8f 100755 --- a/.buildkite/hooks/pre-exit +++ b/.buildkite/hooks/pre-exit @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set +u diff --git a/.buildkite/pipeline.sh b/.buildkite/pipeline.sh index 554e2ef57..c5685435b 100755 --- a/.buildkite/pipeline.sh +++ b/.buildkite/pipeline.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -u DIVERGED=$(git merge-base --fork-point origin/master > /dev/null; echo $?) diff --git a/.buildkite/steps/aurhelper.sh b/.buildkite/steps/aurhelper.sh index 5feea9c24..f57b9931c 100755 --- a/.buildkite/steps/aurhelper.sh +++ b/.buildkite/steps/aurhelper.sh @@ -1,4 +1,4 @@ -#! /bin/bash +#! /usr/bin/env bash GITTAG=$(git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g') diff --git a/.buildkite/steps/aurpackages.sh b/.buildkite/steps/aurpackages.sh index cd2dbf348..104965324 100755 --- a/.buildkite/steps/aurpackages.sh +++ b/.buildkite/steps/aurpackages.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -eu for AUR_PACKAGE in authelia authelia-bin authelia-git; do diff --git a/.buildkite/steps/buildimages.sh b/.buildkite/steps/buildimages.sh index 77034fd37..e3efa59d5 100755 --- a/.buildkite/steps/buildimages.sh +++ b/.buildkite/steps/buildimages.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -eu declare -A BUILDS=(["linux"]="amd64 arm32v7 arm64v8 coverage") diff --git a/.buildkite/steps/deployimages.sh b/.buildkite/steps/deployimages.sh index bf78ede01..8fdd235df 100755 --- a/.buildkite/steps/deployimages.sh +++ b/.buildkite/steps/deployimages.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -eu for BUILD_ARCH in amd64 arm32v7 arm64v8; do diff --git a/.buildkite/steps/e2etests.sh b/.buildkite/steps/e2etests.sh index 25c263621..1c3d5cc58 100755 --- a/.buildkite/steps/e2etests.sh +++ b/.buildkite/steps/e2etests.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -eu for SUITE_NAME in $(authelia-scripts suites list); do diff --git a/.buildkite/steps/ghartifacts.sh b/.buildkite/steps/ghartifacts.sh index 00985fbeb..90a375b7a 100755 --- a/.buildkite/steps/ghartifacts.sh +++ b/.buildkite/steps/ghartifacts.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -eu artifacts=() diff --git a/.buildkite/steps/syncdoc.sh b/.buildkite/steps/syncdoc.sh index 6311b614f..67d4d17cb 100755 --- a/.buildkite/steps/syncdoc.sh +++ b/.buildkite/steps/syncdoc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e diff --git a/bootstrap.sh b/bootstrap.sh index 805b101dc..66ccc2914 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash export PATH=$PATH:./cmd/authelia-scripts/:./.buildkite/steps/:$GOPATH/bin:./web/node_modules/.bin:/tmp diff --git a/cmd/authelia-scripts/authelia-scripts b/cmd/authelia-scripts/authelia-scripts index d9f522641..7c296e782 100755 --- a/cmd/authelia-scripts/authelia-scripts +++ b/cmd/authelia-scripts/authelia-scripts @@ -1,3 +1,3 @@ -#!/bin/bash +#!/usr/bin/env bash go run cmd/authelia-scripts/*.go $* \ No newline at end of file diff --git a/compose/local/setup.sh b/compose/local/setup.sh index 05064cb6c..0907f33d5 100755 --- a/compose/local/setup.sh +++ b/compose/local/setup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash username(){ read -ep "Enter your username for Authelia: " USERNAME diff --git a/internal/suites/example/compose/kind/entrypoint-dashboard.sh b/internal/suites/example/compose/kind/entrypoint-dashboard.sh index eb27de4e4..e94c5e0ec 100755 --- a/internal/suites/example/compose/kind/entrypoint-dashboard.sh +++ b/internal/suites/example/compose/kind/entrypoint-dashboard.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Retries a command on failure. # $1 - the max number of attempts diff --git a/internal/suites/example/kube/bootstrap-dashboard.sh b/internal/suites/example/kube/bootstrap-dashboard.sh index 608cff769..bbaddf893 100755 --- a/internal/suites/example/kube/bootstrap-dashboard.sh +++ b/internal/suites/example/kube/bootstrap-dashboard.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash start_dashboard() { kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-beta8/aio/deploy/recommended.yaml