Sha256: 8b2b33c3ab5469c9eccd2693ff0171a07c467a04c371bd33447416657e1d9848

Contents?: true

Size: 1.53 KB

Versions: 34

Compression:

Stored size: 1.53 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:
############

if test "x$download_url_override" = "x"; then
  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"`
else
  download_url=$download_url_override
  # Set sha256 to empty string if checksum not set
  sha256=${checksum=""}
fi

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

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
mixlib-install-3.12.30 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.12.29 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.12.28 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.12.27 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.12.24 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.12.23 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.12.20 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.12.19 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.12.16 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.12.15 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.12.11 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.12.7 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.12.5 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.12.3 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.12.1 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.11.29 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.11.28 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.11.26 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.11.24 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb
mixlib-install-3.11.21 lib/mixlib/install/generator/bourne/scripts/fetch_metadata.sh.erb