cosmos-sdk 0.32.0版本自动部署shell脚本总结

//这个很简单了,通过相关命令编写脚本就好
#!/bin/bash
#Bash script for constructing cosmos0.32.0 testing

# Cleanup, Version 1.0

#Make sure root dir is $HOME
cd ~

#Stop gaiad & basecoind
if [ -d "cosmos/testing" ]; then
  echo "Kill pre process testing..."
  kill -9 `cat ~/cosmos/testing/pidfile.txt`
  echo "Kill pre process testing Success."
fi

#Build source
cd $GOPATH/src/github.com/cosmos/cosmos-sdk && make install && cd ~

#Make sure root dir is $HOME
cd ~

#Delete old config folder .gaiad
if [ -d ".gaiad" ]; then
  echo "Delete .gaiad folder..."
  rm -rf ~/.gaiad
  echo "Delete .gaiad folder Success."
fi
if [ -d ".gaiacli" ]; then
  echo "Delete .gaiacli folder..."
  rm -rf ~/.gaiacli
  echo "Delete .gaiacli folder Success."
fi
if [ -d "cosmos" ]; then
  echo "Delete .gaiacli folder..."
  rm -rf ~/cosmos
  echo "Delete cosmos folder Success."
fi

# Initialize the genesis.json file that will help you to bootstrap the network
gaiad init --chain-id=testing testing

# Create a key to hold your validator account
expect < pidfile.txt
cd ~
#rest-server https

你可能感兴趣的:(区块链,脚本)