From 8c3b10d72ee81e5e746a4c331ebca63f18d57e9f Mon Sep 17 00:00:00 2001 From: YoungeonLee Date: Sat, 18 Jun 2022 22:19:31 +0900 Subject: [PATCH] Fix regex in install-fabric script The previous regex only takes care of the first argument. The fixed regex allows multiple arguments. Signed-off-by: YoungeonLee --- scripts/install-fabric.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/install-fabric.sh b/scripts/install-fabric.sh index 204d32807e9..6f33a8ff8ef 100755 --- a/scripts/install-fabric.sh +++ b/scripts/install-fabric.sh @@ -275,21 +275,21 @@ fi # Process samples first then the binaries. So if the fabric-samples dir is present # the binaries will go there -if [[ "${_arg_comp[@]}" =~ ^s(amples)? ]]; then +if [[ "${_arg_comp[@]}" =~ (^| |,)s(amples)? ]]; then echo echo "Clone hyperledger/fabric-samples repo" echo cloneSamplesRepo fi -if [[ "${_arg_comp[@]}" =~ ^b(inary)? ]]; then +if [[ "${_arg_comp[@]}" =~ (^| |,)b(inary)? ]]; then echo echo "Pull Hyperledger Fabric binaries" echo pullBinaries fi -if [[ "${_arg_comp[@]}" =~ ^p(odman)? ]]; then +if [[ "${_arg_comp[@]}" =~ (^| |,)p(odman)? ]]; then echo echo "Pull Hyperledger Fabric podman images" echo @@ -297,7 +297,7 @@ if [[ "${_arg_comp[@]}" =~ ^p(odman)? ]]; then pullImages fi -if [[ "${_arg_comp[@]}" =~ ^d(ocker)? ]]; then +if [[ "${_arg_comp[@]}" =~ (^| |,)d(ocker)? ]]; then echo echo "Pull Hyperledger Fabric docker images" echo