diff options
author | Mike Burns <mike@mike-burns.com> | 2013-08-16 18:05:55 +0200 |
---|---|---|
committer | Mike Burns <mike@mike-burns.com> | 2013-08-16 18:05:55 +0200 |
commit | 6d0cc62494d23baad1ba015cb9dc01af4632102b (patch) | |
tree | aeb27b3d89030262721e43780f09143795ffccd8 /bin/rcup | |
parent | 971a2f9e5b2bcbfd0e1589dbd0dd602f7e2cd1c9 (diff) |
Add -h for lsrc, mkrc, rcdn, rcup
Quick usage summaries for the four commands.
Diffstat (limited to 'bin/rcup')
-rwxr-xr-x | bin/rcup | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -85,6 +85,15 @@ handle_file() { fi } +show_help() { + local exit_code=${1:-0} + + $PRINT "Usage: rcup [-CVqvfhikK] [-I EXCL_PAT] [-x EXCL_PAT] [-t TAG] [-d DOT_DIR]" + $PRINT "see rcup(1) and rcm(5) for more details" + + exit $exit_code +} + handle_command_line() { local arg_tags= local verbosity=0 @@ -97,11 +106,12 @@ handle_command_line() { local always_copy=0 REPLACE_ALL=0 - while getopts CVqvfikKI:x:t:d: opt; do + while getopts CVqvfhikKI:x:t:d: opt; do case "$opt" in C) always_copy=1 ;; d) dotfiles_dirs="$dotfiles_dirs $OPTARG" ;; f) REPLACE_ALL=1 ;; + h) show_help ;; i) REPLACE_ALL=0 ;; I) includes="$includes $OPTARG" ;; k) run_hooks=1 ;; |