diff --git a/stepup/start-dev-env.sh b/stepup/start-dev-env.sh index afbe9b7..c3c8520 100755 --- a/stepup/start-dev-env.sh +++ b/stepup/start-dev-env.sh @@ -2,9 +2,22 @@ # Read the apps and their code paths from the arguments passed to the script docker_compose_arg=() + +# Create an associative array (map) for the default paths of the apps +declare -A app_paths +app_paths["webauthn"]="../../Stepup-Webauthn" +app_paths["middleware"]="../../Stepup-Middleware" +app_paths["gateway"]="../../Stepup-Gateway" +app_paths["ra"]="../../Stepup-RA" +app_paths["tiqr"]="../../Stepup-tiqr" +app_paths["azuremfa"]="../../Stepup-Azure-MFA" + for arg in "$@"; do app=$(echo $arg | cut -d ':' -f 1) path=$(echo $arg | cut -d ':' -f 2) + if [[ $path == $app || $path == '' ]]; then + path=${app_paths[$app]} + fi echo "export ${app^^}_CODE_PATH=${path}" >> .start-dev-env-vars docker_compose_args+=("-f ./${app}/docker-compose.override.yml") done