From 482890a268f6595fa9d518c3e82b9fb5b41710c4 Mon Sep 17 00:00:00 2001 From: Robert Spencer Date: Sat, 1 Apr 2017 16:33:21 +0200 Subject: [PATCH] Add help option --- scripts/backstep-traceback-auto | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/scripts/backstep-traceback-auto b/scripts/backstep-traceback-auto index abdec7f..a1003b6 100755 --- a/scripts/backstep-traceback-auto +++ b/scripts/backstep-traceback-auto @@ -17,13 +17,28 @@ #set -e -x +function show_help { + cat <<-EOF + $0 [-hv] [-o lv-name] [daily|weekly] + + -h Show this help. + -v Show verbose debug information & set debug options. + -o Only do a backup of the specified lv. + +EOF +} + export PATH="$PATH:/sbin:/usr/sbin" # Parse options OPTIND=1 -while getopts ":o:v" OPTION +while getopts ":ho:v" OPTION do case "$OPTION" in + h) + show_help + exit 0 + ;; o) ONLY="$OPTARG" ;; -- GitLab