Skip to content

Instantly share code, notes, and snippets.

@phahulin
Last active August 26, 2019 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phahulin/f419f3672959fbc132acfab6eab152b8 to your computer and use it in GitHub Desktop.
Save phahulin/f419f3672959fbc132acfab6eab152b8 to your computer and use it in GitHub Desktop.
install rust and parity dependencies on ubuntu box
#!/usr/bin/env bash
set -eux
set -o pipefail
### usage ###
# chmod +x build-parity-ubuntu.sh
# ./build-parity-ubuntu.sh [branch] [github user]
#
# arguments are optional
# * [branch] => which branch to use (defaults to `master`)
# * [github user] => repo handle (defaults to `paritytech`)
#############
### parameters ###
PARITY_BRANCH="${1:-master}"
PARITY_GITHUB_USER="${2:-paritytech}"
##################
PARITY_REPO="https://github.com/${PARITY_GITHUB_USER}/parity-ethereum"
# clone parity repository
git clone "$PARITY_REPO" -b "$PARITY_BRANCH"
# install parity build dependencies
sudo apt-get update -y
sudo apt-get install -y gcc g++ pkg-config file make cmake
# install rust and cargo
curl https://sh.rustup.rs -sSf | sh -s -- -y
source $HOME/.cargo/env
rustc --version
cargo --version
# build parity
cd "$(basename $PARITY_REPO)"
cargo build --release --features final
./target/release/parity --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment