Skip to content

Commit

Permalink
fix: package seletor REGEX (#135)
Browse files Browse the repository at this point in the history
Signed-off-by: 李亚松 <liyasong1987x@gmail.com>
  • Loading branch information
fly2F committed Mar 27, 2020
1 parent db69c6f commit 4c7bab0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fabcar/startFabric.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ ${PEER1_ORG1} lifecycle chaincode install \
fabcar.tar.gz

echo "Determining package ID for smart contract on peer0.org1.example.com"
REGEX='Package ID: (.*), Label: fabcarv1'
REGEX='Package ID: ([^,]*), Label: fabcarv1'
if [[ `${PEER0_ORG1} lifecycle chaincode queryinstalled` =~ $REGEX ]]; then
PACKAGE_ID_ORG1=${BASH_REMATCH[1]}
else
Expand Down Expand Up @@ -155,7 +155,7 @@ echo "Installing smart contract on peer1.org2.example.com"
${PEER1_ORG2} lifecycle chaincode install fabcar.tar.gz

echo "Determining package ID for smart contract on peer0.org2.example.com"
REGEX='Package ID: (.*), Label: fabcarv1'
REGEX='Package ID: ([^,]*), Label: fabcarv1'
if [[ `${PEER0_ORG2} lifecycle chaincode queryinstalled` =~ $REGEX ]]; then
PACKAGE_ID_ORG2=${BASH_REMATCH[1]}
else
Expand Down

0 comments on commit 4c7bab0

Please sign in to comment.