mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
Improve on the initial PR to expand on the README with detailed information on how to run the external chaincode in a container on the test network and use the node application against it. Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
21 lines
442 B
Bash
Executable file
21 lines
442 B
Bash
Executable file
#!/bin/sh
|
|
|
|
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
|