Merge pull request #60 from simple-rules/leo-scripts

add usage function in the deploy.sh script
pull/61/head
Leo Chen 6 years ago committed by GitHub
commit c4ad11f71f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 30
      deploy.sh

@ -1,3 +1,30 @@
#!/bin/bash
set -eo pipefail
function usage {
local ME=$(basename $0)
cat<<EOU
USAGE: $ME config_file_name
This script will build all the binaries and start benchmark and txgen based on the configuration file.
EXAMPLES:
$ME local_config.txt
EOU
exit 0
}
config=$1
if [ -z "$config" ]; then
usage
fi
# Kill nodes if any
./kill_node.sh
@ -17,7 +44,6 @@ log_folder="tmp_log/log-$t"
mkdir -p $log_folder
# Start nodes
config=$1
while IFS='' read -r line || [[ -n "$line" ]]; do
IFS=' ' read ip port mode shardId <<< $line
#echo $ip $port $mode
@ -27,4 +53,4 @@ while IFS='' read -r line || [[ -n "$line" ]]; do
done < $config
# Generate transactions
./bin/txgen -config_file $config -log_folder $log_folder
./bin/txgen -config_file $config -log_folder $log_folder

Loading…
Cancel
Save