Skip to content

Commit

Permalink
comments added.
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Valdron <[email protected]>
  • Loading branch information
michael-valdron committed Jun 6, 2022
1 parent 2d19029 commit 226b751
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build-tools/dl_starter_projects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,23 @@ do
stack_devfile=$stack_root/devfile.yaml
# Read version list for stack
read -r -a versions <<< "$(ls ${STACKS_DIR}/${stack} | grep -e '[0-9].[0-9].[0-9]' | tr '\n' ' ')"
# If multi version stack
if [[ ${#versions[@]} -gt 0 ]]
then
for version in ${versions[@]}
do
stack_root=$STACKS_DIR/$stack/$version
stack_devfile=$stack_root/devfile.yaml
# If the specified starter project is found
if [ ! -z "$(yq e ".starterProjects[] | select(.name == \"${starter_project}\")" $stack_devfile)" ]
then
# Starter project has a git remote
if [ "$(yq e ".starterProjects[] | select(.name == \"${starter_project}\").git" $stack_devfile)" != "null" ]
then
echo "Downloading ${starter_project} starter project in stack ${stack} version ${version}.."
download_git_starter_project $stack_root $starter_project
echo "Downloading ${starter_project} starter project in stack ${stack} version ${version}..done!"
# Starter project has a zip remote
elif [ "$(yq e ".starterProjects[] | select(.name == \"${starter_project}\").zip" $stack_devfile)" != "null" ]
then
echo "Downloading ${starter_project} starter project in stack ${stack} version ${version}.."
Expand All @@ -70,6 +74,7 @@ do
fi
fi
done
# If not multi version stack & the specified starter project is found
elif [ ! -z "$(yq e ".starterProjects[] | select(.name == \"${starter_project}\")" $stack_devfile)" ]
then
if [ "$(yq e ".starterProjects[] | select(.name == \"${starter_project}\").git" $stack_devfile)" != "null" ]
Expand Down

0 comments on commit 226b751

Please sign in to comment.