fabric-samples/asset-transfer-basic/chaincode-external/sampleBuilder/bin/detect
Arnaud J Le Hors 0bfdecd736 Add chaincode-external for asset-transfer-basic sample.
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>
2020-08-14 15:05:00 -04:00

12 lines
259 B
Bash
Executable file

#!/bin/sh
set -euo pipefail
METADIR=$2
# check if the "type" field is set to "external"
# crude way without jq, fragile but good enough for this sample...
if [ "$(grep type "$METADIR/metadata.json" |cut -f4 -d\")" = "external" ]; then
exit 0
fi
exit 1