Skip to content
This repository was archived by the owner on Dec 10, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 20 additions & 40 deletions install-odoo-saas.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,7 @@

PLATFORM=`uname -i`
echo "PLATFORM=$PLATFORM"

OS_RELEASE="trusty"
# TODO rest systems
source /etc/os-release
if [[ $VERSION == *"Trusty"* ]]
then
OS_RELEASE="trusty"
elif [[ $VERSION == *"jessie"* ]]
then
OS_RELEASE="jessie"
fi
OS_RELEASE=`. /etc/os-release; echo $VERSION_CODENAME`
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double quote to prevent globbing and word splitting.

echo "OS_RELEASE=$OS_RELEASE"


Expand Down Expand Up @@ -122,30 +112,26 @@
whereis wkhtmltopdf | grep -q 'wkhtmltopdf: /' && export WKHTMLTOPDF_INSTALLED='yes'
if [[ "$WKHTMLTOPDF_DEB_URL" == "" ]] || [[ "$WKHTMLTOPDF_DEPENDENCIES" == "" ]]
then
WK_DEPS="xfonts-base xfonts-75dpi libjpeg62-turbo"

# try to guess about the system
WK_PLATFORM="i386"
if [[ "$PLATFORM" == "x86_64" ]]
then
WK_PLATFORM="amd64"
fi

WK_OS='trusty'
if [[ $OS_RELEASE == "trusty" ]]
then
WK_OS='trusty'
WK_DEPS="xfonts-base xfonts-75dpi libjpeg-turbo8"
fi

if [[ "$WKHTMLTOPDF_DEB_URL" == "" ]]
then
WKHTMLTOPDF_DEB_URL="https://downloads.wkhtmltopdf.org/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-${WK_OS}-${WK_PLATFORM}.deb"
WKHTMLTOPDF_DEB_URL="https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox-0.12.5-1.${OS_RELEASE}-${WK_PLATFORM}.deb"
fi

if [[ "$WKHTMLTOPDF_DEPENDENCIES" == "" ]]
then
WKHTMLTOPDF_DEPENDENCIES=$WK_DEPS
if [[ $OS_RELEASE == "trusty" ]]
then
WKHTMLTOPDF_DEPENDENCIES="xfonts-base xfonts-75dpi libjpeg-turbo8"
else
WKHTMLTOPDF_DEPENDENCIES="xfonts-base xfonts-75dpi libjpeg62-turbo"
fi
fi

fi
Expand All @@ -162,12 +148,6 @@
apt-get install -y adduser node-less node-clean-css python python-dateutil python-decorator python-docutils python-feedparser python-imaging python-jinja2 python-ldap python-libxslt1 python-lxml python-mako python-mock python-openid python-passlib python-psutil python-psycopg2 python-babel python-pychart python-pydot python-pyparsing python-pypdf python-reportlab python-requests python-suds python-tz python-vatnumber python-vobject python-werkzeug python-xlwt python-yaml
apt-get install -y python-gevent python-simplejson

if [[ "$ODOO_BRANCH" == "8.0" ]]
then
apt-get install -y python-unittest2
fi


pip install "werkzeug<0.12" --upgrade
pip install psycogreen
# requirements.txt
Expand All @@ -179,15 +159,14 @@
apt-get install -y python-dev build-essential libxml2-dev libxslt1-dev
# uninstall PIL
pip uninstall PIL || echo "PIL is not installed"
if [[ "$OS_RELEASE" == "jessie" ]]
then
apt-get install libjpeg62-turbo-dev zlib1g-dev -y
elif [[ "$OS_RELEASE" == "trusty" ]]
then
apt-get install libjpeg-dev zlib1g-dev -y
else
apt-get install libjpeg-dev zlib1g-dev -y
fi

if [[ "$OS_RELEASE" == "trusty" ]]
then
apt-get install libjpeg-dev zlib1g-dev -y
else
apt-get install libjpeg62-turbo-dev zlib1g-dev -y
fi

# reinstall pillow
pip install -I pillow
# (from here https://github.com/odoo/odoo/issues/612 )
Expand All @@ -213,9 +192,10 @@
pip install oauthlib
pip install requests --upgrade
fi

if [[ "$INIT_POSTGRESQL" != "no" ]]
then

# TODO : Change postgresql install, we are now in version 11
if [[ "$INIT_POSTGRESQL" != "no" ]]
then
### PostgreSQL
if [[ "$INIT_POSTGRESQL" == "docker-container" ]]
then
Expand Down