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/rcdn | |
parent | 971a2f9e5b2bcbfd0e1589dbd0dd602f7e2cd1c9 (diff) |
Add -h for lsrc, mkrc, rcdn, rcup
Quick usage summaries for the four commands.
Diffstat (limited to 'bin/rcdn')
-rwxr-xr-x | bin/rcdn | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -18,6 +18,15 @@ remove_link() { fi } +show_help() { + local exit_code=${1:-0} + + $PRINT "Usage: rcdn [-Vqvh] [-I EXCL_PAT] [-x EXCL_PAT] [-t TAG] [-d DOT_DIR]" + $PRINT "see rcdn(1) and rcm(5) for more details" + + exit $exit_code +} + handle_command_line() { local arg_tags= local verbosity=0 @@ -28,8 +37,9 @@ handle_command_line() { local excludes= local includes= - while getopts VqvI:x:t:d: opt; do + while getopts VqvhI:x:t:d: opt; do case "$opt" in + h) show_help ;; I) includes="$includes $OPTARG";; k) run_hooks=1 ;; K) run_hooks=0 ;; |