From 71f4723f5f5ec6716705d30229742345b72d5514 Mon Sep 17 00:00:00 2001 From: Parameswaran Selvam Date: Tue, 13 Dec 2022 05:46:21 -0800 Subject: [PATCH] added a check for prereq into deploycc script Signed-off-by: Parameswaran Selvam --- test-network/scripts/deployCC.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test-network/scripts/deployCC.sh b/test-network/scripts/deployCC.sh index 9f151aa9..7dbfa67f 100755 --- a/test-network/scripts/deployCC.sh +++ b/test-network/scripts/deployCC.sh @@ -122,6 +122,21 @@ packageChaincode() { successln "Chaincode is packaged" } +function checkPrereqs() { + jq --version > /dev/null 2>&1 + + if [[ $? -ne 0 ]]; then + errorln "jq command not found..." + errorln + errorln "Follow the instructions in the Fabric docs to install the prereqs" + errorln "https://hyperledger-fabric.readthedocs.io/en/latest/prereqs.html" + exit 1 + fi +} + +#check for prerequisites +checkPrereqs + ## package the chaincode packageChaincode