Add hooks.sh usage
This commit is contained in:
parent
a98295bc23
commit
074812f28b
|
@ -9,11 +9,25 @@ fi
|
||||||
|
|
||||||
arg_generate_docs=0
|
arg_generate_docs=0
|
||||||
|
|
||||||
|
function show_usage() {
|
||||||
|
echo "usage: ./scripts/hooks.sh [OPTION]"
|
||||||
|
echo "options:"
|
||||||
|
echo " --fix | --generate-docs to generate docs"
|
||||||
|
echo " -h | --help to show this help"
|
||||||
|
}
|
||||||
|
|
||||||
for arg in "$@"
|
for arg in "$@"
|
||||||
do
|
do
|
||||||
if [ "$arg" == "--fix" ] || [ "$arg" == "--generate-docs" ]
|
if [ "$arg" == "--fix" ] || [ "$arg" == "--generate-docs" ]
|
||||||
then
|
then
|
||||||
arg_generate_docs=1
|
arg_generate_docs=1
|
||||||
|
elif [ "$arg" == "-h" ] || [ "$arg" == "--help" ]
|
||||||
|
then
|
||||||
|
show_usage
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
show_usage
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue