Skip to content

Commit

Permalink
Fix regex in install-fabric script
Browse files Browse the repository at this point in the history
The previous regex only takes care of the first argument. The fixed regex
allows multiple arguments.

Signed-off-by: YoungeonLee <youngl@bu.edu>
  • Loading branch information
YoungeonLee authored and denyeart committed Jun 20, 2022
1 parent 3dfc0b3 commit 8c3b10d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/install-fabric.sh
Original file line number Diff line number Diff line change
Expand Up @@ -275,29 +275,29 @@ 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
CONTAINER_CLI=podman
pullImages
fi

if [[ "${_arg_comp[@]}" =~ ^d(ocker)? ]]; then
if [[ "${_arg_comp[@]}" =~ (^| |,)d(ocker)? ]]; then
echo
echo "Pull Hyperledger Fabric docker images"
echo
Expand Down

0 comments on commit 8c3b10d

Please sign in to comment.