summaryrefslogtreecommitdiff
path: root/bin/rcdn
diff options
context:
space:
mode:
Diffstat (limited to 'bin/rcdn')
-rwxr-xr-xbin/rcdn12
1 files changed, 11 insertions, 1 deletions
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 ;;