github.com/hyperledger-labs/bdls@v2.1.1+incompatible/integration/externalbuilders/binary/bin/build (about)

     1  #!/bin/bash
     2  
     3  # Copyright IBM Corp. All Rights Reserved.
     4  #
     5  # SPDX-License-Identifier: Apache-2.0
     6  
     7  set -euo pipefail
     8  
     9  if [ "$#" -ne 3 ]; then
    10      >&2 echo "Expected 3 directories got $#"
    11      exit 1
    12  fi
    13  
    14  SRC="$1"
    15  META="$2"
    16  BLD="$3"
    17  
    18  if [ -e "$SRC/metadata" ] ; then
    19    cp -a "$SRC/metadata" "$BLD"
    20  fi
    21  
    22  cp "$(jq -r .path "$META/metadata.json")" "$BLD/chaincode"