contrib-script: make it so that you can source everywhere

the aliases are nice to have in other windows; if you want to
source it other places, we should make that possible.
This commit is contained in:
lisa neigut 2019-04-12 12:03:59 -07:00 committed by neil saitug
parent 1d5475197e
commit eb8336331f
1 changed files with 7 additions and 4 deletions

View File

@ -8,7 +8,7 @@
## ##
## $ source contrib/startup_regtest.sh ## $ source contrib/startup_regtest.sh
## Bitcoin server starting ## Bitcoin server starting
## ##
## Let's connect the nodes. ## Let's connect the nodes.
## ##
## $ l2-cli getinfo | jq .id ## $ l2-cli getinfo | jq .id
@ -57,11 +57,14 @@ addr=localhost:9090
EOF EOF
# Start bitcoind in the background # Start bitcoind in the background
bitcoind -daemon -regtest test -f "$PATH_TO_BITCOIN/regtest/bitcoind.pid" || \
bitcoind -daemon -regtest
# Start the lightning nodes # Start the lightning nodes
"$PATH_TO_LIGHTNING/lightningd/lightningd" --lightning-dir=/tmp/l1-regtest test -f /tmp/l1-regtest/lightningd-regtest.pid || \
"$PATH_TO_LIGHTNING/lightningd/lightningd" --lightning-dir=/tmp/l2-regtest "$PATH_TO_LIGHTNING/lightningd/lightningd" --lightning-dir=/tmp/l1-regtest
test -f /tmp/l2-regtest/lightningd-regtest.pid || \
"$PATH_TO_LIGHTNING/lightningd/lightningd" --lightning-dir=/tmp/l2-regtest
alias l1-cli='$PATH_TO_LIGHTNING/cli/lightning-cli --lightning-dir=/tmp/l1-regtest' alias l1-cli='$PATH_TO_LIGHTNING/cli/lightning-cli --lightning-dir=/tmp/l1-regtest'
alias l2-cli='$PATH_TO_LIGHTNING/cli/lightning-cli --lightning-dir=/tmp/l2-regtest' alias l2-cli='$PATH_TO_LIGHTNING/cli/lightning-cli --lightning-dir=/tmp/l2-regtest'