allomov
6/16/2015 - 1:52 PM

download-buildpacks.sh

set -x

cd ~/cf-release/blobs

function download_if_not_exist {
  local target_file=$1
  local object_id=$2
  if [ ! -f $target_file ]; then
    mkdir -p $(dirname $target_file)
    echo "Downloading $target_file"
    wget -O $target_file https://blob.cfblob.com/$object_id
  fi
}

download_if_not_exist java-buildpack/java-buildpack-offline-v3.0.zip 8fe6e89a-aa63-4119-8fd0-23715820f31d
download_if_not_exist java-buildpack/java-buildpack-v3.0.zip 8fe6e89a-aa63-4119-8fd0-23715820f31d
download_if_not_exist nodejs-buildpack/nodejs_buildpack-cached-v1.2.1.zip 21a8eb83-97b9-49cd-ba57-bd2cca1f9133
download_if_not_exist php-buildpack/php_buildpack-offline-v3.1.0.zip b817bdc3-4765-423c-aebd-195b980550a3
download_if_not_exist ruby-buildpack/ruby_buildpack-cached-v1.3.0.zip 3d8d4bfc-91b2-419b-857d-9f26e31340bd
download_if_not_exist python-buildpack/python_buildpack-cached-v1.2.0.zip 3e8561a1-7cdc-45c2-9eff-b8d49ebc4e88
download_if_not_exist go-buildpack/go_buildpack-cached-v1.2.0.zip da609e02-aec5-4d54-93bc-86ca0b44eed7