Skip to content

Commit

Permalink
add backup script help message
Browse files Browse the repository at this point in the history
  • Loading branch information
olebowle committed May 8, 2018
1 parent 331ecda commit 5d1fbe8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,16 @@ handle_module() {
fi
}

while getopts ":o:p:" opt; do
display_help() {
echo "Usage: $0 [-o outdir] [-p mysql_root_password]" >&2
exit 1
}

while getopts ":o:p:h" opt; do
case $opt in
h)
display_help
;;
o)
out="$OPTARG"
;;
Expand All @@ -30,7 +38,7 @@ while getopts ":o:p:" opt; do
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
display_help
;;
esac
done
Expand Down

0 comments on commit 5d1fbe8

Please sign in to comment.