diff options
-rwxr-xr-x | andbackup.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/andbackup.sh b/andbackup.sh index 56d3d39..3bcc064 100755 --- a/andbackup.sh +++ b/andbackup.sh @@ -314,6 +314,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)." @@ -332,8 +337,6 @@ main() { list_restore_apps ${@} elif [ "${cmd}" = 'ls' ] || [ "${cmd}" = 'list' ]; then list_apps - elif [ "${cmd}" = 'help' ]; then - usage else lerror "Unknown command '${cmd}'" usage |