#!/bin/bash
#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# if version not passed in,default to latest released version
VERSION=1.4.1
# if ca version not passed in,default to latest released version
CA_VERSION=1.4.1ARCH=$(echo "$(uname -s|tr '[:upper:]' '[:lower:]'|sed 's/mingw64_nt.*/windows/')-$(uname -m | sed 's/x86_64/amd64/g')")MARCH=$(uname -m)printHelp(){
echo "Usage: bootstrap.sh [version [ca_version]] [options]"
echo
echo "options:"
echo "-h : this help"
echo "-d : bypass docker image download"
echo "-s : bypass fabric-samples repo clone"
echo "-b : bypass download of platform-specific binaries"
echo
echo "e.g. bootstrap.sh 2.2.0 1.4.8 -s"
echo "will download docker images and binaries for Fabric v2.2.0 and Fabric CA v1.4.8"}
# dockerPull() pulls docker images from fabric and chaincode repositories
# note,if a docker image doesn't exist for a requested release, it will simply
# be skipped, since this script doesn't terminate upon errors.dockerPull(){
#three_digit_image_tag is passed in, e.g."1.4.7"
three_digit_image_tag=$1
shift
#two_digit_image_tag is derived, e.g."1.4", especially useful as a local tag for two digit references to most recent baseos, ccenv, javaenv, nodeenv patch releases
two_digit_image_tag=