mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-21 09:05:10 +00:00
fix: package seletor REGEX (#135)
Signed-off-by: 李亚松 <liyasong1987x@gmail.com>
This commit is contained in:
parent
db69c6ff19
commit
4c7bab0c86
1 changed files with 2 additions and 2 deletions
|
|
@ -123,7 +123,7 @@ ${PEER1_ORG1} lifecycle chaincode install \
|
||||||
fabcar.tar.gz
|
fabcar.tar.gz
|
||||||
|
|
||||||
echo "Determining package ID for smart contract on peer0.org1.example.com"
|
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
|
if [[ `${PEER0_ORG1} lifecycle chaincode queryinstalled` =~ $REGEX ]]; then
|
||||||
PACKAGE_ID_ORG1=${BASH_REMATCH[1]}
|
PACKAGE_ID_ORG1=${BASH_REMATCH[1]}
|
||||||
else
|
else
|
||||||
|
|
@ -155,7 +155,7 @@ echo "Installing smart contract on peer1.org2.example.com"
|
||||||
${PEER1_ORG2} lifecycle chaincode install fabcar.tar.gz
|
${PEER1_ORG2} lifecycle chaincode install fabcar.tar.gz
|
||||||
|
|
||||||
echo "Determining package ID for smart contract on peer0.org2.example.com"
|
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
|
if [[ `${PEER0_ORG2} lifecycle chaincode queryinstalled` =~ $REGEX ]]; then
|
||||||
PACKAGE_ID_ORG2=${BASH_REMATCH[1]}
|
PACKAGE_ID_ORG2=${BASH_REMATCH[1]}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue