Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Jul 19, 2024
1 parent 2bd3d98 commit 0c0898e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions smoketest.bash
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ while getopts "hs:prGtAOVXc:bnk" opt; do
;;
t)
nextopt=${!OPTIND}
deploy_all=false
if [[ -n $nextopt && $nextopt != -* ]] ; then
OPTIND=$((OPTIND + 1))
if [ "${nextopt}" = "all" ]; then
for sample in $(find "${DIR}/compose/sample_apps" -type f -exec basename {} \; | cut -d. -f1 | grep -v https); do
FILES+=("${DIR}/compose/sample_apps/${sample}.yml")
done
deploy_all=true
else
for sample in ${nextopt//,/}; do
file="${DIR}/compose/sample_apps/${sample}.yml"
Expand All @@ -81,6 +80,10 @@ while getopts "hs:prGtAOVXc:bnk" opt; do
done
fi
else
# there is no nextopt, ie `-t` was passed and there is no argument or the next argument is another flag
deploy_all=true
fi
if [ "${deploy_all}" = "true" ]; then
for sample in $(find "${DIR}/compose/sample_apps" -type f -exec basename {} \; | cut -d. -f1 | grep -v https); do
FILES+=("${DIR}/compose/sample_apps/${sample}.yml")
done
Expand Down

0 comments on commit 0c0898e

Please sign in to comment.