Added version flag to hosto
This commit is contained in:
parent
4a49c99244
commit
ff02954482
@ -1,12 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
VERSION="0.1.0"
|
||||
|
||||
function help() {
|
||||
echo -e \
|
||||
"Usage: $(basename $0) [OPTIONS]\n\n" \
|
||||
"Options:\n" \
|
||||
" -i, --inv-file <path> Specify the Ansible inventory to add.\n" \
|
||||
" -h, --help Show help.\n"
|
||||
" -h, --help Show help.\n" \
|
||||
" -v, --version Show version."
|
||||
}
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
@ -29,6 +31,10 @@ while [[ $# -gt 0 ]]; do
|
||||
help
|
||||
exit 1
|
||||
;;
|
||||
-v|--version)
|
||||
echo $VERSION
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
POSITIONAL_ARGS+=("$1")
|
||||
shift
|
||||
|
Loading…
x
Reference in New Issue
Block a user