Fix commercial paper org scripts (#362)

The current scripts given to setup the user environment do not work
on Mac:

$ . ./magnetocorp.sh
-bash: cd: /Users/lehors/Projects/Go/src/github.com/hyperledger/fabric-samples/commercial-paper/organization/magnetocorp
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed./../../../test-network: No such file or directory
-bash: ./scripts/envVar.sh: No such file or directory
[...truncated...]
export FABRIC_CFG_PATH="/Users/lehors/Projects/Go/src/github.com/hyperledger/fabric-samples/commercial-paper/organization/magnetocorp"
export PATH="/Users/lehors/Projects/Go/src/github.com/hyperledger/fabric-samples/commercial-paper/organization/magnetocorp"
export PEER_PARMS=""
Saving session...
Saving session...

The session history related output is actually captured when setting the environment variables:

$ echo $FABRIC_CFG_PATH
/Users/lehors/Projects/Go/src/github.com/hyperledger/fabric-samples/commercial-paper/organization/magnetocorp
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed./../../../config

With this simple change the scripts work:

$ echo $FABRIC_CFG_PATH
/Users/lehors/Projects/Go/src/github.com/hyperledger/fabric-samples/commercial-paper/organization/magnetocorp/../../../config

Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
This commit is contained in:
Arnaud J Le Hors 2020-10-27 17:07:49 +01:00 committed by GitHub
parent 1794c026c9
commit 3fbce62c01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -15,7 +15,7 @@ function _exit(){
: ${VERBOSE:="false"}
# Where am I?
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DIR=${PWD}
# Locate the test network
cd "${DIR}/../../../test-network"
@ -36,4 +36,4 @@ env | sort | comm -1 -3 /tmp/env.orig - | sed -E 's/(.*)=(.*)/export \1="\2"/'
rm /tmp/env.orig
cd ${DIR}
cd ${DIR}

View file

@ -15,7 +15,7 @@ function _exit(){
: ${VERBOSE:="false"}
# Where am I?
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DIR=${PWD}
# Locate the test-network
cd "${DIR}/../../../test-network"
@ -35,4 +35,4 @@ export PATH="${DIR}/../../../bin:${PWD}:$PATH"
env | sort | comm -1 -3 /tmp/env.orig - | sed -E 's/(.*)=(.*)/export \1="\2"/'
rm /tmp/env.orig
cd ${DIR}
cd ${DIR}