forked from Manbearpixel/Obsidian-Qt
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sh
executable file
·70 lines (64 loc) · 2.33 KB
/
build.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
#!/bin/bash
#################################################################
# Define functions necessary for building Obsidian #
#################################################################
cleandeps(){
rm -rf LATEST.tar.gz
rm -rf libsodium*
}
build(){
cd src
sudo chmod +x buildquick.sh
sudo ./buildquick.sh
}
init(){
mkdir -p ~/.obsidian && touch $_/obsidian.conf
config=~/.obsidian/obsidian.conf
echo "(Required) RPC User: "
read user
echo "rpcuser=$user" >> $config
echo "(Required) RPC Password: "
unset password;
while IFS=$'\n' read -r -s -n1 pass; do
if [[ -z $pass ]]; then
echo
break
else
echo -n '*'
password+=$pass
fi
done
echo "rpcpassword=$password" >> $config
echo "(Optional) Email Address For Wallet Alerts: "
read email
echo "alertnotify=echo %s | mail -s 'Obsidian Alert' $email" >> $config
}
#################################################################
# Update Ubuntu and install prerequisites for running Obsidian #
#################################################################
sudo apt-get update
#################################################################
# Build Obsidian from source #
#################################################################
NPROC=$(nproc)
echo "nproc: $NPROC"
#################################################################
# Install all necessary packages for building Obsidian #
#################################################################
sudo apt-get install -y qt4-qmake libqt4-dev libminiupnpc-dev libdb++-dev libdb-dev libcrypto++-dev libqrencode-dev libboost-all-dev build-essential libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev libdb++-dev libssl-dev ufw git
sudo add-apt-repository -y ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install -y libdb4.8-dev libdb4.8++-dev
wget https://download.libsodium.org/libsodium/releases/LATEST.tar.gz
tar -xvzf LATEST.tar.gz
cd libsodium*
./configure
make
make check
sudo make install
sudo ldconfig
sudo apt-get install -y libsodium
cd ..
cleandeps
init
build