We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 723abaf commit f07d3e8Copy full SHA for f07d3e8
bin/backup
@@ -1,5 +1,7 @@
1
#!/bin/sh
2
-set -e
+set -e # Exit if a command exists with an error.
3
+set -o pipefail # If any command in a pipe exits with an error, treat the whole pipe as failed.
4
+set -u # Fail if a variable is used, but not defined.
5
[ -z "${BACKUP_NAME}" ] && { echo "error: BACKUP_NAME not set"; exit 1; }
6
[ -z "${BACKUP_GPG_KEY_ID}" ] && { echo "error: BACKUP_GPG_KEY_ID not set"; exit 1; }
7
[ -z "${BACKUP_SSH_DESTINATION}" ] && { echo "error: BACKUP_SSH_DESTINATION not set"; exit 1; }
0 commit comments