deploy.sh: print usage message #130

Merged
valberg merged 1 commits from deploy.sh into main 2022-11-28 14:27:49 +00:00
1 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,13 @@
#!/bin/sh
usage () {
{
echo "Usage: $0 [--vagrant]"
echo "Usage: $0 [--vagrant] base"
echo "Usage: $0 [--vagrant] services [SERVICE]"
} >&2
}
BASE_CMD="ansible-playbook playbook.yml --ask-vault-pass"
if [ "$1" = "--vagrant" ]; then
@ -30,7 +38,7 @@ else
$BASE_CMD --tags base_only
;;
*)
echo >&2 "Command \"$1\" not found!"
usage
exit 1
;;
esac