# artifactory_urls.sh ############ # This section sets up the information for a build to be installed from artifactory # then uses $platform, $platform_version and $machine to select the correct # version. # # Inputs: # $platform: # $platform_version: # $machine: # # Outputs: # $download_url: # $sha256: # $md5: ############ <% artifacts.each do |artifact| %> artifact_info_dir="$tmp_dir/artifact_info/<%= File.join(artifact.platform, artifact.platform_version, artifact.architecture)%>" mkdir -p $artifact_info_dir touch "$artifact_info_dir/artifact_info" echo "url <%= artifact.url%>" >> "$artifact_info_dir/artifact_info" echo "md5 <%= artifact.md5%>" >> "$artifact_info_dir/artifact_info" echo "sha256 <%= artifact.sha256%>" >> "$artifact_info_dir/artifact_info" <% end %> artifact_info_for_platform="$tmp_dir/artifact_info/$platform/$platform_version/$machine/artifact_info" download_url=`awk '$1 == "url" { print $2 }' "$artifact_info_for_platform"` sha256=`awk '$1 == "sha256" { print $2 }' "$artifact_info_for_platform"` md5=`awk '$1 == "md5" { print $2 }' "$artifact_info_for_platform"`