forked from OpenBazaar/OpenBazaar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.sh
executable file
·80 lines (67 loc) · 2.1 KB
/
configure.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
#!/bin/bash
#
# configure.sh - Setup your OpenBazaar development environment in one step.
#
# If you are a Ubuntu or MacOSX user, you can try executing this script
# and you already checked out the OpenBazaar sourcecode from the git repository
# you can try configuring/installing OpenBazaar by simply executing this script
# instead of following the build instructions in the OpenBazaar Wiki
# https://github.com/OpenBazaar/OpenBazaar/wiki/Build-Instructions
#
# This script will only get better as its tested on more development environments
# if you can't modify it to make it better, please open an issue with a full
# error report at https://github.com/OpenBazaar/OpenBazaar/issues/new
#
#
function installMac {
#is brew installed?
which -s brew
if [[ $? != 0 ]] ; then
echo "installing brew..."
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
else
echo "updating, upgrading, checking brew..."
brew update
brew upgrade
brew doctor
brew prune
fi
#is python installed?
which -s python
if [[ $? != 0 ]] ; then
brew install python
fi
#pre-requisites
brew install wget gpg
brew install openssl
brew link openssl --force
sudo easy_install pip
#python libraries
pip install -r --upgrade requirements.txt
#install sqlite3 from brew and manually link it as brew won't link this for us.
brew install sqlite3
SQLITE3_LAST_VERSION=`ls -1t /usr/local/Cellar/sqlite | head -1`
ln -s /usr/local/Cellar/sqlite/${SQLITE3_LAST_VERSION}/bin/sqlite3 /usr/local/bin/sqlite3
doneMessage
}
function doneMessage {
echo ""
echo "OpenBazaar configuration finished."
echo "type './run.sh; tail -f logs/production.log' to start your OpenBazaar servent instance and monitor logging output."
echo ""
echo ""
echo ""
echo ""
}
function installUbuntu {
sudo apt-get update
sudo apt-get install python-pip
sudo apt-get install python-dev python-pip g++ libjpeg-dev zlib1g-dev sqlite3 openssl
sudo pip install -r requirements.txt
doneMessage
}
if [[ $OSTYPE == darwin* ]] ; then
installMac
elif [[ $OSTYPE == linux-gnu ]]; then
installUbuntu
fi