Comment each set with a single line

This commit is contained in:
Kevin van Zonneveld 2016-06-21 13:48:37 +02:00
parent 008face7c8
commit e0aadaf50c

10
main.sh
View File

@ -11,17 +11,15 @@
# Copyright (c) 2013 Kevin van Zonneveld and contributors # Copyright (c) 2013 Kevin van Zonneveld and contributors
# http://bash3boilerplate.sh/#authors # http://bash3boilerplate.sh/#authors
# Exit on error. Append ||true if you expect an error. # Exit on error. Append || true if you expect an error.
# `set` is safer than relying on a shebang like `#!/bin/bash -e` because that is neutralized
# when someone runs your script as `bash yourscript.sh`
set -o errexit set -o errexit
# Exit on error inside any functions or subshells. # Exit on error inside any functions or subshells.
set -o errtrace set -o errtrace
# Do not allow use of undefined vars. Use ${VAR:-} to use an undefined VAR
set -o nounset set -o nounset
# Catch the error in case mysqldump fails (but gzip succeeds) in `mysqldump |gzip`
# Bash will remember & return the highest exitcode in a chain of pipes.
# This way you can catch the error in case mysqldump fails in `mysqldump |gzip`
set -o pipefail set -o pipefail
# Turn on traces, useful while debugging but commented out by default
# set -o xtrace # set -o xtrace
# Environment variables and their defaults # Environment variables and their defaults