Skip to content

Commit

Permalink
[FAB-4906] sed error in generateArtifacts.sh
Browse files Browse the repository at this point in the history
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 <nao.nishijima@hal.hitachi.com>
  • Loading branch information
Nao Nishijima committed Jun 29, 2017
1 parent dc7c40b commit e327448
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions examples/e2e_cli/network_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e327448

Please sign in to comment.