Commit 482890a2 authored by Robert Spencer's avatar Robert Spencer

Add help option

parent c4cd604e
...@@ -17,13 +17,28 @@ ...@@ -17,13 +17,28 @@
#set -e -x #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" export PATH="$PATH:/sbin:/usr/sbin"
# Parse options # Parse options
OPTIND=1 OPTIND=1
while getopts ":o:v" OPTION while getopts ":ho:v" OPTION
do do
case "$OPTION" in case "$OPTION" in
h)
show_help
exit 0
;;
o) o)
ONLY="$OPTARG" ONLY="$OPTARG"
;; ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment