diff options
author | Aaron Ball <nullspoon@oper.io> | 2018-06-09 12:22:12 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@oper.io> | 2018-06-09 12:22:12 -0600 |
commit | f8e413c0bb0ce7b2305545b1b3fcf1cd9849ed2e (patch) | |
tree | f47408d5069e0c9a66d3e59c1c1b44147d3ff763 | |
parent | 60a06067a7683d41653fe83ec5cbf6e74758fd81 (diff) | |
parent | 394d389fab7bd164278410e796f41cff1aaa2724 (diff) | |
download | andbackup-f8e413c0bb0ce7b2305545b1b3fcf1cd9849ed2e.tar.gz andbackup-f8e413c0bb0ce7b2305545b1b3fcf1cd9849ed2e.tar.xz |
Merge branch 'help-no-root'
-rwxr-xr-x | andbackup.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/andbackup.sh b/andbackup.sh index e8bbae8..c48a86f 100755 --- a/andbackup.sh +++ b/andbackup.sh @@ -315,6 +315,11 @@ main() { local cmd=${1:-} shift + if [ "${cmd}" = 'help' ]; then + usage + return 0 + fi + # Ensure root is running this script if [ $(id -u) -gt 0 ]; then lerror "Script must be run as root (uid 0)." @@ -333,8 +338,6 @@ main() { list_restore_apps ${@} elif [ "${cmd}" = 'ls' ] || [ "${cmd}" = 'list' ]; then list_apps - elif [ "${cmd}" = 'help' ]; then - usage else lerror "Unknown command '${cmd}'" usage |