feat(bash): Replace short set options by long format

This commit is contained in:
Carlos Álvaro
2022-11-09 17:12:36 +01:00
committed by Carlos Álvaro
parent 55c150dcdf
commit e59c3c082a
9 changed files with 16 additions and 17 deletions

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -o errexit
set -o pipefail
#--- FUNCTION ------------------------------------------------------------------------------------------------------- #--- FUNCTION -------------------------------------------------------------------------------------------------------
# NAME: log_debug # NAME: log_debug

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -o errexit
set -o pipefail
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -o errexit
set -o pipefail
# shellcheck source=assets/runtime/env-defaults.sh # shellcheck source=assets/runtime/env-defaults.sh
ENV_DEFAULTS_FILE="${SALT_RUNTIME_DIR}/env-defaults.sh" ENV_DEFAULTS_FILE="${SALT_RUNTIME_DIR}/env-defaults.sh"

View File

@@ -7,7 +7,7 @@ set -o pipefail
FUNCTIONS_FILE="${SALT_RUNTIME_DIR}/functions.sh" FUNCTIONS_FILE="${SALT_RUNTIME_DIR}/functions.sh"
source "${FUNCTIONS_FILE}" source "${FUNCTIONS_FILE}"
[[ "${DEBUG,,}" == true ]] && set -x [[ "${DEBUG,,}" == true ]] && set -o xtrace
case "${1}" in case "${1}" in
app:start|app:gen-signed-keys) app:start|app:gen-signed-keys)
@@ -35,7 +35,7 @@ case "${1}" in
exec supervisorctl restart "${1}" exec supervisorctl restart "${1}"
;; ;;
*) *)
log_error "Unable to restart ${1} serice. Service is unknown" log_error "Unable to restart ${1} service. Service is unknown"
exit 1 exit 1
;; ;;
esac esac

View File

@@ -1,8 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
[ "${DEBUG,,}" == true ] && set -vx
echo "🧪 Running basic tests ..." echo "🧪 Running basic tests ..."
# https://stackoverflow.com/a/4774063/3398062 # https://stackoverflow.com/a/4774063/3398062

View File

@@ -1,8 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
[ "${DEBUG,,}" == true ] && set -vx
echo "🧪 Running config-reloader tests ..." echo "🧪 Running config-reloader tests ..."
# https://stackoverflow.com/a/4774063/3398062 # https://stackoverflow.com/a/4774063/3398062

View File

@@ -1,8 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
[ "${DEBUG,,}" == true ] && set -vx
echo "🧪 Running gitfs tests ..." echo "🧪 Running gitfs tests ..."
# https://stackoverflow.com/a/4774063/3398062 # https://stackoverflow.com/a/4774063/3398062

View File

@@ -1,5 +1,13 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -o errexit
set -o pipefail
if [[ "${DEBUG,,}" == true ]]; then
set -o verbose
set -o xtrace
fi
#--- ENV VARIABLE --------------------------------------------------------------------------------------------------- #--- ENV VARIABLE ---------------------------------------------------------------------------------------------------
# NAME: IMAGE_NAME # NAME: IMAGE_NAME
# DESCRIPTION: The name and tag of the Docker image. Default: 'cdalvaro/docker-salt-master:latest'. # DESCRIPTION: The name and tag of the Docker image. Default: 'cdalvaro/docker-salt-master:latest'.

View File

@@ -1,8 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e
[ "${DEBUG,,}" == true ] && set -vx
echo "🧪 Running salt-api tests ..." echo "🧪 Running salt-api tests ..."
# https://stackoverflow.com/a/4774063/3398062 # https://stackoverflow.com/a/4774063/3398062