diff options
author | Aaron LI <aly@aaronly.me> | 2019-01-06 20:45:49 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2019-01-08 19:18:28 +0800 |
commit | 96c9dd06a80c981a9d9fa5c9effe72136df96660 (patch) | |
tree | d13a98c7670b60c99afeeeed847f82438b10cf61 /dfly-update | |
parent | 2848c8beddb237e4c9803560cbb08dd173a94fda (diff) | |
download | dfly-update-96c9dd06a80c981a9d9fa5c9effe72136df96660.tar.bz2 |
Merge "version" sub-command into "help"
Improve the help text a bit.
Diffstat (limited to 'dfly-update')
-rwxr-xr-x | dfly-update | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/dfly-update b/dfly-update index bfe2206..971b1a2 100755 --- a/dfly-update +++ b/dfly-update @@ -378,24 +378,16 @@ _EOF_ # Sub-command functions # -cmd_version() { - cat <<_EOF_ -v${VERSION} -Aaron LI <aly@aaronly.me> -https://github.com/liweitianux/dfly-update -_EOF_ -} - cmd_usage() { cat <<_EOF_ dfly-update - DragonFly BSD update tool using binary release/snapshots -Usage: +Usage: ${0##*/} <sub-command> + +Sub-commands: help | --help | -h Show this help. - version | --version | -v - Show version information of this tool. - mount <filepath> + mount <dfly.img> Mount the given image file backup Back up the current kernel and world @@ -403,11 +395,13 @@ Usage: Install the new kernel, world, and config files cleanup Clean up obsolete files, umount and remove image file - fly | go + fly <dfly.img> Synthetic command to upgrade the system! + +v${VERSION} +Aaron LI <aly@aaronly.me> +https://github.com/liweitianux/dfly-update _EOF_ - echo - cmd_version } # Mount the given image file @@ -471,8 +465,7 @@ cmd_fly() { # Load configurations [ -r "${CONFIGFILE}" ] && . ${CONFIGFILE} -COMMAND="$1" -case "${COMMAND}" in +case $1 in mount) shift cmd_mount "$@" @@ -489,13 +482,10 @@ case "${COMMAND}" in shift cmd_cleanup ;; - fly|go) + fly) shift cmd_fly "$@" ;; - version|--version|-v) - cmd_version - ;; help|--help|-h|*) cmd_usage ;; |