From 6d0cc62494d23baad1ba015cb9dc01af4632102b Mon Sep 17 00:00:00 2001 From: Mike Burns Date: Fri, 16 Aug 2013 18:05:55 +0200 Subject: Add -h for lsrc, mkrc, rcdn, rcup Quick usage summaries for the four commands. --- bin/rcdn | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'bin/rcdn') diff --git a/bin/rcdn b/bin/rcdn index 2c52be4..1f44fa2 100755 --- a/bin/rcdn +++ b/bin/rcdn @@ -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 ;; -- cgit v1.2.3