Last active
August 26, 2019 13:55
-
-
Save phahulin/f419f3672959fbc132acfab6eab152b8 to your computer and use it in GitHub Desktop.
install rust and parity dependencies on ubuntu box
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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