Skip to content
This repository has been archived by the owner on Jul 28, 2020. It is now read-only.

Commit

Permalink
Make fetch-assets work if there are no extras
Browse files Browse the repository at this point in the history
Signed-off-by: Mark DeLillo <[email protected]>
  • Loading branch information
ekcasey authored and mdelillo committed Jul 29, 2016
1 parent d2e3cdd commit f623506
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bosh/fetch-assets
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,13 @@ done

cp ${release_dir}/*.tgz "${assets_dir}/releases"

number_of_extras=$(echo $versions | jq '.extras | length')
extras=$(echo $versions | jq -r '.extras | keys[]')
if [[ $(echo $versions | jq -r 'has("extras")') == 'true' ]]; then
extras=$(echo $versions | jq -r '.extras | keys[]')
for name in $extras; do
url=$(echo $versions | jq ".extras.\"${name}\".url" -r)
aws s3 cp "$url" "${assets_dir}/extras/${name}.tgz"
done
fi

cp "$versions_json_path" "$assets_dir/versions"
cp -a "$pcfdev_dir"/images/{http,keys,scripts} "$output_dir"

0 comments on commit f623506

Please sign in to comment.