Skip to content

Commit

Permalink
Fix getopts option-string (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiluo-msft authored Nov 28, 2016
1 parent 543def3 commit 7cf0f31
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ EOF

docker_image_name=''
docker_image_tag=latest
while getopts ":it:" opt; do
## The option-string tells getopts which options to expect and which of them must have an argument
## When you want getopts to expect an argument for an option, just place a : (colon) after the proper option flag
## If the very first character of the option-string is a :, getopts switches to "silent error reporting mode".
while getopts "i:t:" opt; do
case $opt in
i)
docker_image_name=$OPTARG
Expand Down

0 comments on commit 7cf0f31

Please sign in to comment.