Skip to content
Snippets Groups Projects
Unverified Commit cb322691 authored by Thomas Woerner's avatar Thomas Woerner Committed by GitHub
Browse files

Merge pull request #1311 from rjeffman/consistent_cli_arguments

infra/image/build.sh: Use consistent options for hostname
parents e92f09b9 a96611fb
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,7 @@ valid_distro() { ...@@ -15,7 +15,7 @@ valid_distro() {
usage() { usage() {
local prog="${0##*/}" local prog="${0##*/}"
cat << EOF cat << EOF
usage: ${prog} [-h] [-p] [-c HOSTNAME] [-s] distro usage: ${prog} [-h] [-p] [-n HOSTNAME] [-s] distro
${prog} build a container image to test ansible-freeipa. ${prog} build a container image to test ansible-freeipa.
EOF EOF
} }
...@@ -29,7 +29,7 @@ positional arguments: ...@@ -29,7 +29,7 @@ positional arguments:
optional arguments: optional arguments:
-c HOSTNAME Container hostname -n HOSTNAME Container hostname
-p Give extended privileges to the container -p Give extended privileges to the container
-s Deploy IPA server -s Deploy IPA server
EOF EOF
...@@ -43,11 +43,11 @@ quayname="quay.io/ansible-freeipa/upstream-tests" ...@@ -43,11 +43,11 @@ quayname="quay.io/ansible-freeipa/upstream-tests"
deploy_server="N" deploy_server="N"
privileged="" privileged=""
while getopts ":hc:ps" option while getopts ":hn:ps" option
do do
case "${option}" in case "${option}" in
h) help && exit 0 ;; h) help && exit 0 ;;
c) hostname="${OPTARG}" ;; n) hostname="${OPTARG}" ;;
p) privileged="privileged" ;; p) privileged="privileged" ;;
s) deploy_server="Y" ;; s) deploy_server="Y" ;;
*) die -u "Invalid option: ${option}" ;; *) die -u "Invalid option: ${option}" ;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment