diff --git a/scripts/bin/hosto b/scripts/bin/hosto index e93c5e9..55f7347 100755 --- a/scripts/bin/hosto +++ b/scripts/bin/hosto @@ -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 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