mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 07:25:10 +00:00
21 lines
444 B
Bash
Executable file
21 lines
444 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
SOURCE=$1
|
|
OUTPUT=$3
|
|
|
|
#external chaincodes expect connection.json file in the chaincode package
|
|
if [ ! -f "$SOURCE/connection.json" ]; then
|
|
>&2 echo "$SOURCE/connection.json not found"
|
|
exit 1
|
|
fi
|
|
|
|
#simply copy the endpoint information to specified output location
|
|
cp $SOURCE/connection.json $OUTPUT/connection.json
|
|
|
|
if [ -d "$SOURCE/metadata" ]; then
|
|
cp -a $SOURCE/metadata $OUTPUT/metadata
|
|
fi
|
|
|
|
exit 0
|