From e327448722c14bd59619b8f58ae62e52dfb3915f Mon Sep 17 00:00:00 2001 From: Nao Nishijima Date: Wed, 28 Jun 2017 14:35:15 -0700 Subject: [PATCH] [FAB-4906] sed error in generateArtifacts.sh generateArtifacts.sh does not work at 2nd time. Due to generating a private key every time, if we execute generateArtifacts.sh more than once, the command to get the private key will return more than one result. However, we do not expect this result. This patch set adds checking code of the existence of crypto-config dir at the beginning. Change-Id: Ie9249556c1988e30463683f688e4e50dc75d7b15 Signed-off-by: Nao Nishijima --- examples/e2e_cli/network_setup.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/e2e_cli/network_setup.sh b/examples/e2e_cli/network_setup.sh index d5094662412..85fbd924e96 100755 --- a/examples/e2e_cli/network_setup.sh +++ b/examples/e2e_cli/network_setup.sh @@ -52,9 +52,13 @@ function removeUnwantedImages() { } function networkUp () { - #Generate all the artifacts that includes org certs, orderer genesis block, - # channel configuration transaction - source generateArtifacts.sh $CH_NAME + if [ -f "./crypto-config" ]; then + echo "crypto-config directory already exists." + else + #Generate all the artifacts that includes org certs, orderer genesis block, + # channel configuration transaction + source generateArtifacts.sh $CH_NAME + fi if [ "${IF_COUCHDB}" == "couchdb" ]; then CHANNEL_NAME=$CH_NAME TIMEOUT=$CLI_TIMEOUT docker-compose -f $COMPOSE_FILE -f $COMPOSE_FILE_COUCH up -d 2>&1