From 3fab06eb89d76b6a8842a9146b6998cac7437dd5 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 21 Dec 2023 16:31:19 +0200 Subject: [PATCH] Adding a default set of paths for the apps --- stepup/start-dev-env.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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