Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/fablo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,10 @@ executeFabloCommand() {
if [ -f "$FABLO_TARGET/fabric-docker.sh" ]; then
echo "Executing Fablo Docker command: $1"
chmod +x "$FABLO_TARGET/fabric-docker.sh" || true
"$FABLO_TARGET/fabric-docker.sh" "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8"
"$FABLO_TARGET/fabric-docker.sh" "$@"
elif [ -f "$FABLO_TARGET/fabric-k8s.sh" ]; then
echo "Executing Fablo Kubernetes command: $1"
"$FABLO_TARGET/fabric-k8s.sh" "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8"
"$FABLO_TARGET/fabric-k8s.sh" "$@"
else
echo "Error: Corrupted Fablo target directory ($FABLO_TARGET)"
echo "Cannot execute command $1"
Expand Down Expand Up @@ -421,5 +421,5 @@ elif [ "$COMMAND" = "restore" ]; then
restoreSnapshot "$2" "${3:-""}"

else
executeFabloCommand "$COMMAND" "$2" "$3" "$4" "$5" "$6" "$7" "$8"
executeFabloCommand "$COMMAND" "${@:2}"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -1481,17 +1481,17 @@ elif [ "$1" = "stop" ]; then
elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then
installChaincodes
elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then
installChaincode "$3" "$4"
installChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then
upgradeChaincode "$3" "$4"
upgradeChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then
runDevModeChaincode "$3" "$4"
runDevModeChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then
chaincodeInvoke "$3" "$4" "$5" "$6" "$7"
chaincodeInvoke "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "query" ]; then
chaincodeQuery "$3" "$4" "$5" "$6" "$7"
chaincodeQuery "\${@:3}"
elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then
chaincodeList "$3" "$4"
chaincodeList "\${@:3}"
elif [ "$1" = "channel" ]; then
channelQuery "\${@:2}"
elif [ "$1" = "snapshot" ]; then
Expand All @@ -1508,6 +1508,7 @@ else
echo "To list channel query helper commands type: 'fablo channel --help'"
echo "Also check: 'chaincode install'"
echo "Use 'help' or '--help' for more information"
exit 1
fi
"
`;
Expand Down Expand Up @@ -1584,7 +1585,7 @@ chaincodeList() {
# 5. transient data (optional)
chaincodeInvoke() {
if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then
echo "Expected 4 or 5 parameters for chaincode list, but got: $*"
echo "Expected 4 or 5 parameters for chaincode invoke, but got: $*"
echo "Usage: fablo chaincode invoke <peer_domains_comma_separated> <channel_name> <chaincode_name> <command> [transient]"
exit 1
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1488,17 +1488,17 @@ elif [ "$1" = "stop" ]; then
elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then
installChaincodes
elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then
installChaincode "$3" "$4"
installChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then
upgradeChaincode "$3" "$4"
upgradeChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then
runDevModeChaincode "$3" "$4"
runDevModeChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then
chaincodeInvoke "$3" "$4" "$5" "$6" "$7"
chaincodeInvoke "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "query" ]; then
chaincodeQuery "$3" "$4" "$5" "$6" "$7"
chaincodeQuery "\${@:3}"
elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then
chaincodeList "$3" "$4"
chaincodeList "\${@:3}"
elif [ "$1" = "channel" ]; then
channelQuery "\${@:2}"
elif [ "$1" = "snapshot" ]; then
Expand All @@ -1515,6 +1515,7 @@ else
echo "To list channel query helper commands type: 'fablo channel --help'"
echo "Also check: 'chaincode install'"
echo "Use 'help' or '--help' for more information"
exit 1
fi
"
`;
Expand Down Expand Up @@ -1595,7 +1596,7 @@ chaincodeList() {
# 5. transient data (optional)
chaincodeInvoke() {
if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then
echo "Expected 4 or 5 parameters for chaincode list, but got: $*"
echo "Expected 4 or 5 parameters for chaincode invoke, but got: $*"
echo "Usage: fablo chaincode invoke <peer_domains_comma_separated> <channel_name> <chaincode_name> <command> [transient]"
exit 1
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1564,17 +1564,17 @@ elif [ "$1" = "stop" ]; then
elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then
installChaincodes
elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then
installChaincode "$3" "$4"
installChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then
upgradeChaincode "$3" "$4"
upgradeChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then
runDevModeChaincode "$3" "$4"
runDevModeChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then
chaincodeInvoke "$3" "$4" "$5" "$6" "$7"
chaincodeInvoke "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "query" ]; then
chaincodeQuery "$3" "$4" "$5" "$6" "$7"
chaincodeQuery "\${@:3}"
elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then
chaincodeList "$3" "$4"
chaincodeList "\${@:3}"
elif [ "$1" = "channel" ]; then
channelQuery "\${@:2}"
elif [ "$1" = "snapshot" ]; then
Expand All @@ -1591,6 +1591,7 @@ else
echo "To list channel query helper commands type: 'fablo channel --help'"
echo "Also check: 'chaincode install'"
echo "Use 'help' or '--help' for more information"
exit 1
fi
"
`;
Expand Down Expand Up @@ -1667,7 +1668,7 @@ chaincodeList() {
# 5. transient data (optional)
chaincodeInvoke() {
if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then
echo "Expected 4 or 5 parameters for chaincode list, but got: $*"
echo "Expected 4 or 5 parameters for chaincode invoke, but got: $*"
echo "Usage: fablo chaincode invoke <peer_domains_comma_separated> <channel_name> <chaincode_name> <command> [transient]"
exit 1
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2170,17 +2170,17 @@ elif [ "$1" = "stop" ]; then
elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then
installChaincodes
elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then
installChaincode "$3" "$4"
installChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then
upgradeChaincode "$3" "$4"
upgradeChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then
runDevModeChaincode "$3" "$4"
runDevModeChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then
chaincodeInvoke "$3" "$4" "$5" "$6" "$7"
chaincodeInvoke "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "query" ]; then
chaincodeQuery "$3" "$4" "$5" "$6" "$7"
chaincodeQuery "\${@:3}"
elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then
chaincodeList "$3" "$4"
chaincodeList "\${@:3}"
elif [ "$1" = "channel" ]; then
channelQuery "\${@:2}"
elif [ "$1" = "snapshot" ]; then
Expand All @@ -2197,6 +2197,7 @@ else
echo "To list channel query helper commands type: 'fablo channel --help'"
echo "Also check: 'chaincode install'"
echo "Use 'help' or '--help' for more information"
exit 1
fi
"
`;
Expand Down Expand Up @@ -2284,7 +2285,7 @@ chaincodeList() {
# 5. transient data (optional)
chaincodeInvoke() {
if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then
echo "Expected 4 or 5 parameters for chaincode list, but got: $*"
echo "Expected 4 or 5 parameters for chaincode invoke, but got: $*"
echo "Usage: fablo chaincode invoke <peer_domains_comma_separated> <channel_name> <chaincode_name> <command> [transient]"
exit 1
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3539,17 +3539,17 @@ elif [ "$1" = "stop" ]; then
elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then
installChaincodes
elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then
installChaincode "$3" "$4"
installChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then
upgradeChaincode "$3" "$4"
upgradeChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then
runDevModeChaincode "$3" "$4"
runDevModeChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then
chaincodeInvoke "$3" "$4" "$5" "$6" "$7"
chaincodeInvoke "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "query" ]; then
chaincodeQuery "$3" "$4" "$5" "$6" "$7"
chaincodeQuery "\${@:3}"
elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then
chaincodeList "$3" "$4"
chaincodeList "\${@:3}"
elif [ "$1" = "channel" ]; then
channelQuery "\${@:2}"
elif [ "$1" = "snapshot" ]; then
Expand All @@ -3566,6 +3566,7 @@ else
echo "To list channel query helper commands type: 'fablo channel --help'"
echo "Also check: 'chaincode install'"
echo "Use 'help' or '--help' for more information"
exit 1
fi
"
`;
Expand Down Expand Up @@ -3660,7 +3661,7 @@ chaincodeList() {
# 5. transient data (optional)
chaincodeInvoke() {
if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then
echo "Expected 4 or 5 parameters for chaincode list, but got: $*"
echo "Expected 4 or 5 parameters for chaincode invoke, but got: $*"
echo "Usage: fablo chaincode invoke <peer_domains_comma_separated> <channel_name> <chaincode_name> <command> [transient]"
exit 1
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3968,17 +3968,17 @@ elif [ "$1" = "stop" ]; then
elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then
installChaincodes
elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then
installChaincode "$3" "$4"
installChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then
upgradeChaincode "$3" "$4"
upgradeChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then
runDevModeChaincode "$3" "$4"
runDevModeChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then
chaincodeInvoke "$3" "$4" "$5" "$6" "$7"
chaincodeInvoke "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "query" ]; then
chaincodeQuery "$3" "$4" "$5" "$6" "$7"
chaincodeQuery "\${@:3}"
elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then
chaincodeList "$3" "$4"
chaincodeList "\${@:3}"
elif [ "$1" = "channel" ]; then
channelQuery "\${@:2}"
elif [ "$1" = "snapshot" ]; then
Expand All @@ -3995,6 +3995,7 @@ else
echo "To list channel query helper commands type: 'fablo channel --help'"
echo "Also check: 'chaincode install'"
echo "Use 'help' or '--help' for more information"
exit 1
fi
"
`;
Expand Down Expand Up @@ -4097,7 +4098,7 @@ chaincodeList() {
# 5. transient data (optional)
chaincodeInvoke() {
if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then
echo "Expected 4 or 5 parameters for chaincode list, but got: $*"
echo "Expected 4 or 5 parameters for chaincode invoke, but got: $*"
echo "Usage: fablo chaincode invoke <peer_domains_comma_separated> <channel_name> <chaincode_name> <command> [transient]"
exit 1
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1690,17 +1690,17 @@ elif [ "$1" = "stop" ]; then
elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then
installChaincodes
elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then
installChaincode "$3" "$4"
installChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then
upgradeChaincode "$3" "$4"
upgradeChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then
runDevModeChaincode "$3" "$4"
runDevModeChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then
chaincodeInvoke "$3" "$4" "$5" "$6" "$7"
chaincodeInvoke "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "query" ]; then
chaincodeQuery "$3" "$4" "$5" "$6" "$7"
chaincodeQuery "\${@:3}"
elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then
chaincodeList "$3" "$4"
chaincodeList "\${@:3}"
elif [ "$1" = "channel" ]; then
channelQuery "\${@:2}"
elif [ "$1" = "snapshot" ]; then
Expand All @@ -1717,6 +1717,7 @@ else
echo "To list channel query helper commands type: 'fablo channel --help'"
echo "Also check: 'chaincode install'"
echo "Use 'help' or '--help' for more information"
exit 1
fi
"
`;
Expand Down Expand Up @@ -1797,7 +1798,7 @@ chaincodeList() {
# 5. transient data (optional)
chaincodeInvoke() {
if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then
echo "Expected 4 or 5 parameters for chaincode list, but got: $*"
echo "Expected 4 or 5 parameters for chaincode invoke, but got: $*"
echo "Usage: fablo chaincode invoke <peer_domains_comma_separated> <channel_name> <chaincode_name> <command> [transient]"
exit 1
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2253,17 +2253,17 @@ elif [ "$1" = "stop" ]; then
elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then
installChaincodes
elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then
installChaincode "$3" "$4"
installChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then
upgradeChaincode "$3" "$4"
upgradeChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then
runDevModeChaincode "$3" "$4"
runDevModeChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then
chaincodeInvoke "$3" "$4" "$5" "$6" "$7"
chaincodeInvoke "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "query" ]; then
chaincodeQuery "$3" "$4" "$5" "$6" "$7"
chaincodeQuery "\${@:3}"
elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then
chaincodeList "$3" "$4"
chaincodeList "\${@:3}"
elif [ "$1" = "channel" ]; then
channelQuery "\${@:2}"
elif [ "$1" = "snapshot" ]; then
Expand All @@ -2280,6 +2280,7 @@ else
echo "To list channel query helper commands type: 'fablo channel --help'"
echo "Also check: 'chaincode install'"
echo "Use 'help' or '--help' for more information"
exit 1
fi
"
`;
Expand Down Expand Up @@ -2363,7 +2364,7 @@ chaincodeList() {
# 5. transient data (optional)
chaincodeInvoke() {
if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then
echo "Expected 4 or 5 parameters for chaincode list, but got: $*"
echo "Expected 4 or 5 parameters for chaincode invoke, but got: $*"
echo "Usage: fablo chaincode invoke <peer_domains_comma_separated> <channel_name> <chaincode_name> <command> [transient]"
exit 1
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1710,17 +1710,17 @@ elif [ "$1" = "stop" ]; then
elif [ "$1" = "chaincodes" ] && [ "$2" = "install" ]; then
installChaincodes
elif [ "$1" = "chaincode" ] && [ "$2" = "install" ]; then
installChaincode "$3" "$4"
installChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "upgrade" ]; then
upgradeChaincode "$3" "$4"
upgradeChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "dev" ]; then
runDevModeChaincode "$3" "$4"
runDevModeChaincode "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "invoke" ]; then
chaincodeInvoke "$3" "$4" "$5" "$6" "$7"
chaincodeInvoke "\${@:3}"
elif [ "$1" = "chaincode" ] && [ "$2" = "query" ]; then
chaincodeQuery "$3" "$4" "$5" "$6" "$7"
chaincodeQuery "\${@:3}"
elif [ "$1" = "chaincodes" ] && [ "$2" = "list" ]; then
chaincodeList "$3" "$4"
chaincodeList "\${@:3}"
elif [ "$1" = "channel" ]; then
channelQuery "\${@:2}"
elif [ "$1" = "snapshot" ]; then
Expand All @@ -1737,6 +1737,7 @@ else
echo "To list channel query helper commands type: 'fablo channel --help'"
echo "Also check: 'chaincode install'"
echo "Use 'help' or '--help' for more information"
exit 1
fi
"
`;
Expand Down Expand Up @@ -1817,7 +1818,7 @@ chaincodeList() {
# 5. transient data (optional)
chaincodeInvoke() {
if [ "$#" -ne 4 ] && [ "$#" -ne 5 ]; then
echo "Expected 4 or 5 parameters for chaincode list, but got: $*"
echo "Expected 4 or 5 parameters for chaincode invoke, but got: $*"
echo "Usage: fablo chaincode invoke <peer_domains_comma_separated> <channel_name> <chaincode_name> <command> [transient]"
exit 1
fi
Expand Down
Loading
Loading