diff --git a/backup.sh b/backup.sh index 4bfe994..4009f45 100644 --- a/backup.sh +++ b/backup.sh @@ -90,31 +90,48 @@ backup_configs() { done } -# Check if the first command-line flag is `-a` and run all of the options if -# applicable, check for the other flags otherwise. -if [[ "${1}" != "-a" ]]; then - while [[ ! -z ${1} ]]; do - case ${1} in - "-d" | "--docker") - backup_docker - ;; - "-p" | "--postgres") - backup_postgres - ;; - "-c" | "--configs") - backup_configs - ;; - "-a") - die "-a cannot be specified after any other flags." - ;; - esac - shift - done -else - backup_configs - backup_docker - # backup_postgres - # This is commented out by default, as PostgreSQL backups might be - # preferable to run under a separate user. -fi +print_help() { + cat <