aboutsummaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-09-27 12:59:44 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-09-27 12:59:44 +0200
commitf9c705fa0e6b6440bcf1d8adf5b58f5030c93e48 (patch)
treeebb24d0de08c4aeaadf17882ddd0467d377c26eb /install.sh
parentFixed install.sh script. (diff)
downloadnewspipe-f9c705fa0e6b6440bcf1d8adf5b58f5030c93e48.tar.gz
newspipe-f9c705fa0e6b6440bcf1d8adf5b58f5030c93e48.tar.bz2
newspipe-f9c705fa0e6b6440bcf1d8adf5b58f5030c93e48.zip
Updated installation script.
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/install.sh b/install.sh
index 20444252..1a078619 100755
--- a/install.sh
+++ b/install.sh
@@ -11,9 +11,15 @@ PYTHON_VERSION="3.5"
sudo apt-get install -y build-essential git wget > /dev/null
sudo apt-get install -y libxml2-dev libxslt1-dev > /dev/null # for lxml
+sudo apt-get install -y libssl-dev openssl > /dev/null # for pip
echo "Installation of Python..."
+if [ "$1" == postgres ]; then
+ sudo apt-get install -y libpq-dev > /dev/null
+elif [ "$1" == sqlite ]; then
+ sudo apt-get install -y libsqlite3-dev > /dev/null
+fi
wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tar.xz -o /dev/null > /dev/null
tar -xf Python-3.5.2.tar.xz > /dev/null
rm Python-3.5.2.tar.xz > /dev/null
@@ -29,19 +35,21 @@ sudo rm -Rf Python-3.5.2/
echo "Installing required Python libraries..."
sed -i '/psycopg2/d' requirements.txt > /dev/null
+sudo pip$PYTHON_VERSION install --upgrade pip
sudo pip$PYTHON_VERSION install --upgrade -r requirements.txt > /dev/null
+
# Initializes the configuration file
cp src/conf/conf.cfg-sample src/conf/conf.cfg
-
# Delete default database configuration
sed -i '/database/d' src/conf/conf.cfg
sed -i '/database_url/d' src/conf/conf.cfg
+
+# Configuration of the database
if [ "$1" == postgres ]; then
echo "Installing requirements for PostgreSQL..."
sudo apt-get install -y postgresql postgresql-server-dev-9.4 postgresql-client > /dev/null
- sudo apt-get install -y libpq-dev > /dev/null
sudo pip$PYTHON_VERSION install psycopg2 > /dev/null
echo "Configuring the database..."
echo "127.0.0.1:5433:aggregator:pgsqluser:pgsqlpwd" > ~/.pgpass
@@ -57,6 +65,7 @@ if [ "$1" == postgres ]; then
elif [ "$1" == sqlite ]; then
# Add configuration lines for SQLite
echo "Configuring the SQLite database..."
+
echo '[database]' >> src/conf/conf.cfg
echo 'database_url = sqlite:///jarr.db' >> src/conf/conf.cfg
fi
bgstack15