fix: package seletor REGEX (#135)

Signed-off-by: 李亚松 <liyasong1987x@gmail.com>
This commit is contained in:
YasongLi 2020-03-27 21:36:30 +08:00 committed by GitHub
parent db69c6ff19
commit 4c7bab0c86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
@ -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