mirror of
https://github.com/fluencelabs/tendermint
synced 2025-05-02 01:52:16 +00:00
[consensus/test_data/build.sh] install tendermint if absent
This commit is contained in:
parent
e325ffc681
commit
7e56aad51a
17
consensus/test_data/build.sh
Normal file → Executable file
17
consensus/test_data/build.sh
Normal file → Executable file
@ -1,18 +1,23 @@
|
||||
#! /bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# XXX: removes tendermint dir
|
||||
|
||||
cd $GOPATH/src/github.com/tendermint/tendermint
|
||||
cd "$GOPATH/src/github.com/tendermint/tendermint" || exit 1
|
||||
|
||||
# Make sure we have a tendermint command.
|
||||
if ! hash tendermint 2>/dev/null; then
|
||||
make install
|
||||
fi
|
||||
|
||||
# specify a dir to copy
|
||||
# TODO: eventually we should replace with `tendermint init --test`
|
||||
DIR=$HOME/.tendermint_test/consensus_state_test
|
||||
DIR_TO_COPY=$HOME/.tendermint_test/consensus_state_test
|
||||
|
||||
rm -rf $HOME/.tendermint
|
||||
cp -r $DIR $HOME/.tendermint
|
||||
rm -rf "$HOME/.tendermint"
|
||||
cp -r "$DIR_TO_COPY" "$HOME/.tendermint"
|
||||
|
||||
function reset(){
|
||||
rm -rf $HOME/.tendermint/data
|
||||
rm -rf "$HOME/.tendermint/data"
|
||||
tendermint unsafe_reset_priv_validator
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user