Last active
August 29, 2015 14:01
-
-
Save maran/8dc397ed79331f16e284 to your computer and use it in GitHub Desktop.
Ubuntu 14.04 Ethereum Go install
This file contains hidden or 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
#!/bin/bash -i | |
# This script will install Go & QML | |
# Please download and make it executable and run it as such to make sure the script reloads bashrc | |
# wget https://gist.githubusercontent.com/maran/8dc397ed79331f16e284/raw -O install | |
# chmod +x install | |
# ./install | |
VERSION="1.2.2" | |
function fromPkg(){ | |
sudo apt-get install -y golang | |
echo "PATH=$PATH:$HOME/go/bin" >> ~/.bashrc | |
} | |
function fromSource(){ | |
cd /tmp/ | |
wget https://storage.googleapis.com/golang/go$VERSION.linux-amd64.tar.gz | |
sudo tar -C /usr/local -xzf go$VERSION.linux-amd64.tar.gz | |
echo "PATH=$PATH:$HOME/go/bin:/usr/local/go/bin" >> ~/.bashrc | |
} | |
if lsb_release -sr | grep 14.04; then | |
echo "Ubuntu 14.04 found." | |
lts=true | |
else | |
echo "This script is made for Ubuntu 14.04, this probably won't work, want to try it anyway?" | |
lts=false | |
select yn in "Yes" "No"; do | |
case $yn in | |
Yes ) break;; | |
No ) exit;; | |
esac | |
done | |
fi | |
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa | |
sudo apt-get update | |
sudo apt-get install -y ubuntu-sdk qtbase5-private-dev qtdeclarative5-private-dev libqt5opengl5-dev git mercurial libgmp3-dev libreadline6-dev | |
if [ "$lts" = true ] ; then | |
fromPkg | |
else | |
fromSource | |
fi | |
mkdir -p $HOME/go | |
echo "export GOPATH=$HOME/go" >> ~/.bashrc | |
source ~/.bashrc | |
if go version; then | |
echo "Go installed correctly; installing Ethereal" | |
else | |
echo "Go failed to install. Please report this to the developers" | |
exit | |
fi | |
go get -u github.com/ethereum/go-ethereum/ethereal | |
go get -u github.com/ethereum/go-ethereum/ethereum | |
printf "\n\n# Installation complete #\n" | |
printf "Please reload your bashrc 'source ~/.bashrc' now and continue on when you have done so.\n\n" | |
printf "Please start Ethereal by issuing:\ncd $GOPATH/src/github.com/ethereum/go-ethereum/ethereal && ethereal\n" | |
echo "If you rather run without a gui you can start ethereum by issuing the 'ethereum' command" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment