Re: Problem with setup

Akimitsu Shiseki <jl17850@...>

Hi Andrew,
I got the same error working with byfn, just after I upgraded my mac to macOS Mojave.
To fix it, I captured the output of curl to a temporary file first:
$ curl -sSL > byfn_prereq.txt
Then I modified the file to replace getopt with getopts
Finally I ran bash using the modified file as input:
$ cat byfn_prereq.txt | bash -s 1.3.0
This allowed me to install the prereqs correctly. 
Before doing so, I had also installed gnu-getopt but it (alone?) didn't work. If just replacing getopt with getopts doesn't work, try to install gnu-getopt also. 
Shiseki, Akimitsu 
IBM Cloud Meister, Blockchain Solutions, IS&BD, IBM Japan
Twitter: @akishiseki
Phone: 050-3149-6994 / 080-6706-6994 / x206-6994

----- Original message -----
From: "Nye Liu" <nye@...>
Sent by: fabric@...
To: Andrew Bowers <andrew.bowers@...>, bart.gelders@...
Cc: hyperledger-fabric@...
Subject: Re: [Hyperledger Fabric] Problem with setup
Date: Wed, Nov 28, 2018 7:55 AM
getopt on macOS is hopelessly broken.
In particular, this line will not work correctly:
options=$(getopt -o b,d,h,s --long help -- "$@")
On Nov 27, 2018, at 7:08 PM, Andrew Bowers <andrew.bowers@...> wrote:
I’m trying to run one of the setup commands for the Sample, Binaries and Docker Images:
curl -sSL | bash -s 1.3.0
I’m getting the following error:
ERROR: Unexpected argument: --
    Usage: bash [OPTION]... [version [ca_version [thirdparty_version]]]
        -h|--help Print this message
        -d        Bypass docker image download
        -s        Bypass fabric-samples repo clone
        -b        Bypass download of platform-specific binaries
        To download docker images for version 1.3.0
        ==> bash -sb 1.3.0
Any idea what is happening?
This message and any attachments are solely for the intended recipient and may contain confidential or privileged information.  If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited.  If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you.

Join to automatically receive all group messages.