From a068a3d842fe7980449889d32dcf1b8810f53feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Volkov=C3=A1?= Date: Tue, 5 May 2026 17:13:38 +0200 Subject: [PATCH] fix: switch shebang to /usr/bin/env bash This makes bootstrap.sh easier to use on NixOS among others. --- bootstrap.sh | 2 +- docker/bin/bootstrap.sh | 2 +- docker/keycloak/prepare.sh | 2 +- docs/customizing/hooks.md | 4 ++-- scripts/download-full-history.sh | 4 +++- scripts/functions.sh | 2 +- scripts/mysql.sh | 2 +- scripts/occ.sh | 2 +- scripts/php-mod-config | 2 +- scripts/update-certs | 2 +- scripts/update-hosts | 2 +- 11 files changed, 14 insertions(+), 12 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index bd653dc5..27cb0b99 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -o errexit set -o nounset diff --git a/docker/bin/bootstrap.sh b/docker/bin/bootstrap.sh index 94174d5a..5fbdcb02 100755 --- a/docker/bin/bootstrap.sh +++ b/docker/bin/bootstrap.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # shellcheck disable=SC2181 # set -o xtrace diff --git a/docker/keycloak/prepare.sh b/docker/keycloak/prepare.sh index d674b941..cf8434de 100755 --- a/docker/keycloak/prepare.sh +++ b/docker/keycloak/prepare.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash KEYCLOAK_REALM_CONFIG="/opt/keycloak/data/import/Example-realm.json" PROTOCOL="${PROTOCOL:-http}" diff --git a/docs/customizing/hooks.md b/docs/customizing/hooks.md index 5c3ab9ad..94c7d968 100644 --- a/docs/customizing/hooks.md +++ b/docs/customizing/hooks.md @@ -12,7 +12,7 @@ The following hooks are currently available: ## Example for after-install.sh ```bash -#!/bin/bash +#!/usr/bin/env bash echo 'Create some users' export OC_PASS=mycustomuser @@ -22,7 +22,7 @@ occ user:add --password-from-env mycustomuser ## Example for before-start.sh ```bash -#!/bin/bash +#!/usr/bin/env bash echo 'Always disable the firstrunwizard' occ app:disable firstrunwizard diff --git a/scripts/download-full-history.sh b/scripts/download-full-history.sh index 32d090eb..f920a038 100755 --- a/scripts/download-full-history.sh +++ b/scripts/download-full-history.sh @@ -1,4 +1,6 @@ -#!/bin/bash -e +#!/usr/bin/env bash + +set -e isShallow() { # Reference: https://stackoverflow.com/a/37533086 diff --git a/scripts/functions.sh b/scripts/functions.sh index 3e14e3b7..3608a024 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash function get_docker_compose_command() { docker-compose version >/dev/null 2>/dev/null && DCC='docker-compose' diff --git a/scripts/mysql.sh b/scripts/mysql.sh index 95b73753..5d4935c9 100755 --- a/scripts/mysql.sh +++ b/scripts/mysql.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd) diff --git a/scripts/occ.sh b/scripts/occ.sh index c72d306d..a93ee68a 100755 --- a/scripts/occ.sh +++ b/scripts/occ.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd) diff --git a/scripts/php-mod-config b/scripts/php-mod-config index 36469f20..197aec01 100755 --- a/scripts/php-mod-config +++ b/scripts/php-mod-config @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd) diff --git a/scripts/update-certs b/scripts/update-certs index e6662997..dfe0dabb 100755 --- a/scripts/update-certs +++ b/scripts/update-certs @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd) diff --git a/scripts/update-hosts b/scripts/update-hosts index e55d47c8..8ef90563 100755 --- a/scripts/update-hosts +++ b/scripts/update-hosts @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -e SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && pwd)