corda/scripts/trader-demo.sh
Ross Nicoll e433663875 Correct TraderDemo after network map changes
Script to run TraderDemo now specified network map service rather than timestamper service.
TraderDemo now explicitly states the services it needs to run. Previously this was implied by whether a timestamper service was specified, and the code was not updated when that change was made.
2016-05-04 17:45:00 +01:00

34 lines
928 B
Bash
Executable File

#!/bin/bash
mode=$1
if [ ! -e ./gradlew ]; then
echo "Run from the root directory please"
exit 1
fi
if [[ "$SKIP_INSTALL" == "" ]]; then
./gradlew installDist
fi
if [[ "$mode" == "buyer" ]]; then
if [ ! -d buyer ]; then
mkdir buyer
echo "myLegalName = Bank A" >buyer/config
fi
build/install/r3prototyping/bin/r3prototyping --dir=buyer --service-fake-trades --network-address=localhost
elif [[ "$mode" == "seller" ]]; then
if [ ! -d seller ]; then
mkdir seller
echo "myLegalName = Bank B" >seller/config
fi
build/install/r3prototyping/bin/r3prototyping --dir=seller --fake-trade-with=localhost --network-address=localhost:31340 --network-map-identity-file=buyer/identity-public --network-map-address=localhost
else
echo "Run like this, one in each tab:"
echo
echo " scripts/trader-demo.sh buyer"
echo " scripts/trader-demo.sh seller"
fi