forked from scala-network/GUI-miner
-
Notifications
You must be signed in to change notification settings - Fork 24
/
bloc_gui_miner_ubuntu_install.sh
96 lines (76 loc) · 2.45 KB
/
bloc_gui_miner_ubuntu_install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/bin/bash
# This has been tested on Ubuntu 16.04 ONLY!
# Use it on your own risk!
# https://stackoverflow.com/a/5947802/1057527
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
LIGHT_BLUE='\033[0;34m'
NC='\033[0m' # No Color
STEP=1
# https://gist.github.com/JamieMason/4761049
function echo_step {
printf "${GREEN}${1}${NC}\n"
}
function echo_warning {
printf "${YELLOW}${1}${NC}\n"
}
function echo_success {
printf "${LIGHT_BLUE}${1}${NC}\n"
}
# Updating repositories list
echo_step "${STEP}. Updating repositories list...\n"
STEP=$((STEP + 1))
sudo apt-get update
printf "\n"
# Installing dependencies
echo_step "${STEP}. Installing dependencies...\n"
STEP=$((STEP + 1))
sudo apt-get install gcc make python libmicrohttpd10 libnss3 -y
printf "\n"
# Installing golang
echo_step "${STEP}. Installing golang...\n"
STEP=$((STEP + 1))
cd ~
wget https://dl.google.com/go/go1.11.2.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.11.2.linux-amd64.tar.gz
rm -f go1.11.2.linux-amd64.tar.gz
cp ~/.bashrc ~/.bashrc.original
echo "" >> ~/.bashrc
echo "# golang" >> ~/.bashrc
echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.bashrc
echo "export PATH=\$PATH:~/go/bin" >> ~/.bashrc
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:~/go/bin
# Cloning GUI-miner
echo_step "${STEP}. Cloning GUI-miner...\n"
STEP=$((STEP + 1))
cd ~
rm -fr ~/GUI-miner
git clone https://github.com/furiousteam/BLOC-GUI-Miner.git GUI-miner
# Installing GUI-miner dependencies
echo_step "${STEP}. Installing GUI-miner dependencies...\n"
STEP=$((STEP + 1))
cd ~
rm -fr ~/go
go get -u github.com/asticode/go-astilectron
go get -u github.com/asticode/go-astilectron-bundler/...
go get -u github.com/asticode/go-astichartjs
go get -u github.com/asticode/go-astilectron-bootstrap
go get -u github.com/google/uuid
go get -u github.com/mitchellh/go-ps
go get -u github.com/furiousteam/BLOC-GUI-Miner/src/gui
go get -u github.com/konsorten/go-windows-terminal-sequences
go get -u github.com/mattn/go-colorable
# Updating GUI-miner electron version
echo_step "${STEP}. Updating GUI-miner electron version...\n"
STEP=$((STEP + 1))
cp ~/go/src/github.com/asticode/go-astilectron/astilectron.go ~/go/src/github.com/asticode/go-astilectron/astilectron.go.original
sed -i 's/1.8.1/3.0.8/' ~/go/src/github.com/asticode/go-astilectron/astilectron.go
cd ~/go/src/github.com/asticode/go-astilectron-bundler
make
# Compile GUI-miner
echo_step "${STEP}. Compile GUI-miner...\n"
STEP=$((STEP + 1))
cd ~/GUI-miner
make
echo_success "Done!"