2016-02-23 17:26:13 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
mode=$1
|
|
|
|
|
|
|
|
if [ ! -e ./gradlew ]; then
|
|
|
|
echo "Run from the root directory please"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-04-25 13:21:47 +00:00
|
|
|
if [[ "$SKIP_INSTALL" == "" ]]; then
|
|
|
|
./gradlew installDist
|
|
|
|
fi
|
2016-02-23 17:26:13 +00:00
|
|
|
|
|
|
|
if [[ "$mode" == "buyer" ]]; then
|
|
|
|
if [ ! -d buyer ]; then
|
|
|
|
mkdir buyer
|
2016-04-07 17:36:15 +00:00
|
|
|
echo "myLegalName = Bank A" >buyer/config
|
2016-02-23 17:26:13 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
build/install/r3prototyping/bin/r3prototyping --dir=buyer --service-fake-trades --network-address=localhost
|
|
|
|
elif [[ "$mode" == "seller" ]]; then
|
|
|
|
if [ ! -d seller ]; then
|
|
|
|
mkdir seller
|
2016-04-07 17:36:15 +00:00
|
|
|
echo "myLegalName = Bank B" >seller/config
|
2016-02-23 17:26:13 +00:00
|
|
|
fi
|
|
|
|
|
2016-05-04 16:43:45 +00:00
|
|
|
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
|
2016-02-23 17:26:13 +00:00
|
|
|
else
|
|
|
|
echo "Run like this, one in each tab:"
|
|
|
|
echo
|
|
|
|
echo " scripts/trader-demo.sh buyer"
|
|
|
|
echo " scripts/trader-demo.sh seller"
|
|
|
|
fi
|