Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- pkill cardano-node
- # You may need to change this to ~/.local/bin depending upon your setup
- ex_path=~/.cabal/bin
- version=$1
- if [[ ! $version ]]; then
- echo "You must provide a version number as an argument to the script... i.e. ./upgrade.sh 1.18.1"
- exit
- else
- echo "Upgrading cardano-node to tag $version..."
- fi
- # You may need to change this if your cardano-node folder is not in your home directory
- cd ~/cardano-node
- git fetch --all
- git checkout tags/$version
- mkdir -p ~/backup-bin
- cp $ex_path/* ~/backup-bin
- rm $ex_path/*
- cabal clean
- cabal update
- cabal build all
- cp dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-cli-$version/x/cardano-cli/build/cardano-cli/cardano-cli $ex_path
- cp dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-node-$version/x/cardano-node/build/cardano-node/cardano-node $ex_path
- cp dist-newstyle/build/x86_64-linux/ghc-8.6.5/cardano-node-$version/x/chairman/build/chairman/chairman $ex_path
- echo -e "Build Complete\n"
- cardano-node --version
- cardano-cli --version
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement