mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-26 03:25:09 +00:00
shellcheck fix
Signed-off-by: lengyijun <sjtu5140809011@gmail.com>
This commit is contained in:
parent
a461ff581e
commit
ef31973a0c
2 changed files with 7 additions and 6 deletions
|
|
@ -1,7 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
ENV_DAL=`echo $DISCOVERY_AS_LOCALHOST`
|
ENV_DAL="$DISCOVERY_AS_LOCALHOST"
|
||||||
|
|
||||||
echo "ENV_DAL:"$DISCOVERY_AS_LOCALHOST
|
echo "ENV_DAL:""$DISCOVERY_AS_LOCALHOST"
|
||||||
|
|
||||||
if [ "$ENV_DAL" != "true" ]
|
if [ "$ENV_DAL" != "true" ]
|
||||||
then
|
then
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,9 @@ set -e
|
||||||
export MSYS_NO_PATHCONV=1
|
export MSYS_NO_PATHCONV=1
|
||||||
starttime=$(date +%s)
|
starttime=$(date +%s)
|
||||||
CC_SRC_LANGUAGE=${1:-"go"}
|
CC_SRC_LANGUAGE=${1:-"go"}
|
||||||
CC_SRC_LANGUAGE=`echo "$CC_SRC_LANGUAGE" | tr [:upper:] [:lower:]`
|
CC_SRC_LANGUAGE=$(echo "$CC_SRC_LANGUAGE" | tr '[:upper:]' '[:lower:]')
|
||||||
|
|
||||||
if [ "$CC_SRC_LANGUAGE" = "go" -o "$CC_SRC_LANGUAGE" = "golang" ] ; then
|
if [ "$CC_SRC_LANGUAGE" = "go" ] -o [ "$CC_SRC_LANGUAGE" = "golang" ] ; then
|
||||||
CC_SRC_PATH="../chaincode/fabcar/go/"
|
CC_SRC_PATH="../chaincode/fabcar/go/"
|
||||||
elif [ "$CC_SRC_LANGUAGE" = "javascript" ]; then
|
elif [ "$CC_SRC_LANGUAGE" = "javascript" ]; then
|
||||||
CC_SRC_PATH="../chaincode/fabcar/javascript/"
|
CC_SRC_PATH="../chaincode/fabcar/javascript/"
|
||||||
|
|
@ -22,7 +22,7 @@ elif [ "$CC_SRC_LANGUAGE" = "java" ]; then
|
||||||
elif [ "$CC_SRC_LANGUAGE" = "typescript" ]; then
|
elif [ "$CC_SRC_LANGUAGE" = "typescript" ]; then
|
||||||
CC_SRC_PATH="../chaincode/fabcar/typescript/"
|
CC_SRC_PATH="../chaincode/fabcar/typescript/"
|
||||||
else
|
else
|
||||||
echo The chaincode language ${CC_SRC_LANGUAGE} is not supported by this script
|
echo The chaincode language "${CC_SRC_LANGUAGE}" is not supported by this script
|
||||||
echo Supported chaincode languages are: go, java, javascript, and typescript
|
echo Supported chaincode languages are: go, java, javascript, and typescript
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
@ -37,7 +37,7 @@ rm -rf go/wallet/*
|
||||||
pushd ../test-network
|
pushd ../test-network
|
||||||
./network.sh down
|
./network.sh down
|
||||||
./network.sh up createChannel -ca -s couchdb
|
./network.sh up createChannel -ca -s couchdb
|
||||||
./network.sh deployCC -ccn fabcar -ccv 1 -cci initLedger -ccl ${CC_SRC_LANGUAGE} -ccp ${CC_SRC_PATH}
|
./network.sh deployCC -ccn fabcar -ccv 1 -cci initLedger -ccl "${CC_SRC_LANGUAGE}" -ccp "${CC_SRC_PATH}"
|
||||||
popd
|
popd
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue