Adding inline help

This commit is contained in:
Patrick MARIE 2024-10-08 19:57:56 +02:00
parent 2ad69d5c1e
commit dcdbfa7123
Signed by: mycroft
GPG Key ID: BB519E5CD8E7BFA7

View File

@ -8,7 +8,7 @@ DATA_DIR=$(pwd)/data
MAX_NUM=0
VERBOSE=0
while getopts ":r:b:d:vxn:" opt
while getopts ":r:b:d:vxn:h" opt
do
case ${opt} in
r)
@ -29,6 +29,11 @@ do
x)
set -x
;;
h)
echo "Usage: $0 [-r <repository url>] [-b <branch>] [-d <absolute path dest>] [-n <num>] [-v] [-x] [-h]"
echo "Ex: $0 -r $REPOSITORY -b $BRANCH -d $DATA_DIR"
exit 0
;;
?)
echo "Invalid option -${OPTARG}"
exit 1