Extract init.sh

This commit is contained in:
Simon Warta
2020-02-10 14:25:33 +01:00
parent 36e909f61d
commit fe5acb9056
4 changed files with 16 additions and 7 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
Run the following:
```
./start.sh
./start.sh && ./init.sh
```
## CLI
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
set -o errexit -o nounset -o pipefail
command -v shellcheck > /dev/null && shellcheck "$0"
echo "Waiting for blockchain and REST server to be available ..."
timeout 60 bash -c "until curl -s http://localhost:1317/node_info > /dev/null; do sleep 0.5; done"
# The chain is unreliable in the first second of its existence (https://gist.github.com/webmaster128/8175692d4af5e6c572fddda7a9ef437c)
sleep 1
echo "Okay, thank you for your patience."
SCRIPT_DIR="$(realpath "$(dirname "$0")")"
"$SCRIPT_DIR/deploy_erc20.js"