From 010fcb544fa1988dafd6c06e5669b30b0f66d09b Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Sun, 22 Apr 2018 14:01:31 -0400 Subject: [PATCH] [FAB-9326] Clean up byfn.sh, drop "-m" option Some general cleanup of byfn.sh script: - Given that "-m" is deprecated, remove its normal processing, but retain (for now) its early recognition so that CI passes. - Drop reference to "--help", only "-h" is supported. - Add reference to "upgrade" mode to usage message and comment. Change-Id: If1d6624c8788ec660abca5d13e7c87aafb13ce59 Signed-off-by: Robert P. J. Day --- first-network/byfn.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/first-network/byfn.sh b/first-network/byfn.sh index 5d71bd76bb..4c582e4d69 100755 --- a/first-network/byfn.sh +++ b/first-network/byfn.sh @@ -35,9 +35,8 @@ export VERBOSE=false # Print the usage message function printHelp () { echo "Usage: " - echo " byfn.sh up|down|restart|generate|upgrade [-c ] [-t ] [-d ] [-f ] [-s ] [-i ]" - echo " byfn.sh -h|--help (print this message)" - echo " - one of 'up', 'down', 'restart' or 'generate'" + echo " byfn.sh [-c ] [-t ] [-d ] [-f ] [-s ] [-l ] [-i ] [-v]" + echo " - one of 'up', 'down', 'restart', 'generate' or 'upgrade'" echo " - 'up' - bring up the network with docker-compose up" echo " - 'down' - clear the network with docker-compose down" echo " - 'restart' - restart the network" @@ -51,6 +50,7 @@ function printHelp () { echo " -l - the chaincode language: golang (default) or node" echo " -i - the tag to be used to launch the network (defaults to \"latest\")" echo " -v - verbose mode" + echo " byfn.sh -h (print this message)" echo echo "Typically, one would first generate the required certificates and " echo "genesis block, then bring up the network. e.g.:" @@ -456,7 +456,7 @@ if [ "$1" = "-m" ];then # supports old usage, muscle memory is powerful! shift fi MODE=$1;shift -# Determine whether starting, stopping, restarting or generating for announce +# Determine whether starting, stopping, restarting, generating or upgrading if [ "$MODE" == "up" ]; then EXPMODE="Starting" elif [ "$MODE" == "down" ]; then @@ -472,7 +472,7 @@ else exit 1 fi -while getopts "h?m:c:t:d:f:s:l:i:v" opt; do +while getopts "h?c:t:d:f:s:l:i:v" opt; do case "$opt" in h|\?) printHelp