Skip to content

Commit 1dbcfbe

Browse files
comments added.
Signed-off-by: Michael Valdron <[email protected]>
1 parent b93be51 commit 1dbcfbe

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

build-tools/dl_starter_projects.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,19 +49,23 @@ do
4949
stack_devfile=$stack_root/devfile.yaml
5050
# Read version list for stack
5151
read -r -a versions <<< "$(ls ${STACKS_DIR}/${stack} | grep -e '[0-9].[0-9].[0-9]' | tr '\n' ' ')"
52+
# If multi version stack
5253
if [[ ${#versions[@]} -gt 0 ]]
5354
then
5455
for version in ${versions[@]}
5556
do
5657
stack_root=$STACKS_DIR/$stack/$version
5758
stack_devfile=$stack_root/devfile.yaml
59+
# If the specified starter project is found
5860
if [ ! -z "$(yq e ".starterProjects[] | select(.name == \"${starter_project}\")" $stack_devfile)" ]
5961
then
62+
# Starter project has a git remote
6063
if [ "$(yq e ".starterProjects[] | select(.name == \"${starter_project}\").git" $stack_devfile)" != "null" ]
6164
then
6265
echo "Downloading ${starter_project} starter project in stack ${stack} version ${version}.."
6366
download_git_starter_project $stack_root $starter_project
6467
echo "Downloading ${starter_project} starter project in stack ${stack} version ${version}..done!"
68+
# Starter project has a zip remote
6569
elif [ "$(yq e ".starterProjects[] | select(.name == \"${starter_project}\").zip" $stack_devfile)" != "null" ]
6670
then
6771
echo "Downloading ${starter_project} starter project in stack ${stack} version ${version}.."
@@ -70,13 +74,16 @@ do
7074
fi
7175
fi
7276
done
77+
# If not multi version stack & the specified starter project is found
7378
elif [ ! -z "$(yq e ".starterProjects[] | select(.name == \"${starter_project}\")" $stack_devfile)" ]
7479
then
80+
# Starter project has a git remote
7581
if [ "$(yq e ".starterProjects[] | select(.name == \"${starter_project}\").git" $stack_devfile)" != "null" ]
7682
then
7783
echo "Downloading ${starter_project} starter project in stack ${stack}.."
7884
download_git_starter_project $stack_root $starter_project
7985
echo "Downloading ${starter_project} starter project in stack ${stack}..done!"
86+
# Starter project has a zip remote
8087
elif [ "$(yq e ".starterProjects[] | select(.name == \"${starter_project}\").zip" $stack_devfile)" != "null" ]
8188
then
8289
echo "Downloading ${starter_project} starter project in stack ${stack}.."

0 commit comments

Comments
 (0)