Sha256: 1e126248ef8d7bd49567b79c03a56426019d2adb5c9b89280070d1440b7cdb3a

Contents?: true

Size: 1.33 KB

Versions: 15

Compression:

Stored size: 1.33 KB

Contents

# fetch_metadata.sh
############
# This section calls omnitruck to get the information about the build to be
#   installed.
#
# Inputs:
# $channel:
# $project:
# $version:
# $platform:
# $platform_version:
# $machine:
# $tmp_dir:
#
# Outputs:
# $download_url:
# $sha256:
############

echo "Getting information for $project $channel $version for $platform..."

metadata_filename="$tmp_dir/metadata.txt"
metadata_url="<%= base_url %>/$channel/$project/metadata?v=$version&p=$platform&pv=$platform_version&m=$machine"

do_download "$metadata_url"  "$metadata_filename"

cat "$metadata_filename"

echo ""
# check that all the mandatory fields in the downloaded metadata are there
if grep '^url' $metadata_filename > /dev/null && grep '^sha256' $metadata_filename > /dev/null; then
  echo "downloaded metadata file looks valid..."
else
  echo "downloaded metadata file is corrupted or an uncaught error was encountered in downloading the file..."
  # this generally means one of the download methods downloaded a 404 or something like that and then reported a successful exit code,
  # and this should be fixed in the function that was doing the download.
  report_bug
  exit 1
fi

download_url=`awk '$1 == "url" { print $2 }' "$metadata_filename"`
sha256=`awk '$1 == "sha256" { print $2 }' "$metadata_filename"`

############
# end of fetch_metadata.sh
############

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
mixlib-install-3.2.0 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.1.0 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.0.0 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-2.1.12 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-2.1.11 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-2.1.10 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-2.1.9 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-2.1.8 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-2.1.7 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-2.1.6 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-2.1.5 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-2.1.4 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-2.1.3 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-2.1.2 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-2.1.1 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb