Skip to content

Commit 010fcb5

Browse files
committed
[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 <rpjday@crashcourse.ca>
1 parent 54b071b commit 010fcb5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

first-network/byfn.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ export VERBOSE=false
3535
# Print the usage message
3636
function printHelp () {
3737
echo "Usage: "
38-
echo " byfn.sh up|down|restart|generate|upgrade [-c <channel name>] [-t <timeout>] [-d <delay>] [-f <docker-compose-file>] [-s <dbtype>] [-i <imagetag>]"
39-
echo " byfn.sh -h|--help (print this message)"
40-
echo " <mode> - one of 'up', 'down', 'restart' or 'generate'"
38+
echo " byfn.sh <mode> [-c <channel name>] [-t <timeout>] [-d <delay>] [-f <docker-compose-file>] [-s <dbtype>] [-l <language>] [-i <imagetag>] [-v]"
39+
echo " <mode> - one of 'up', 'down', 'restart', 'generate' or 'upgrade'"
4140
echo " - 'up' - bring up the network with docker-compose up"
4241
echo " - 'down' - clear the network with docker-compose down"
4342
echo " - 'restart' - restart the network"
@@ -51,6 +50,7 @@ function printHelp () {
5150
echo " -l <language> - the chaincode language: golang (default) or node"
5251
echo " -i <imagetag> - the tag to be used to launch the network (defaults to \"latest\")"
5352
echo " -v - verbose mode"
53+
echo " byfn.sh -h (print this message)"
5454
echo
5555
echo "Typically, one would first generate the required certificates and "
5656
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!
456456
shift
457457
fi
458458
MODE=$1;shift
459-
# Determine whether starting, stopping, restarting or generating for announce
459+
# Determine whether starting, stopping, restarting, generating or upgrading
460460
if [ "$MODE" == "up" ]; then
461461
EXPMODE="Starting"
462462
elif [ "$MODE" == "down" ]; then
@@ -472,7 +472,7 @@ else
472472
exit 1
473473
fi
474474

475-
while getopts "h?m:c:t:d:f:s:l:i:v" opt; do
475+
while getopts "h?c:t:d:f:s:l:i:v" opt; do
476476
case "$opt" in
477477
h|\?)
478478
printHelp

0 commit comments

Comments
 (0)