Merge lp:~cv.clearcorp/oerptools/oerptools into lp:oerptools

Proposed by Carlos Vásquez (ClearCorp)
Status: Merged
Merged at revision: 430
Proposed branch: lp:~cv.clearcorp/oerptools/oerptools
Merge into: lp:oerptools
Diff against target: 167 lines (+40/-20)
1 file modified
bash/openerp-scripts/openerp-lib.sh (+40/-20)
To merge this branch: bzr merge lp:~cv.clearcorp/oerptools/oerptools
Reviewer Review Type Date Requested Status
ClearCorp drivers Pending
Review via email: mp+216610@code.launchpad.net

Commit message

[ADD] the newest ubuntu distros

Description of the change

Add the newest ubuntu distros

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bash/openerp-scripts/openerp-lib.sh'
--- bash/openerp-scripts/openerp-lib.sh 2013-02-18 17:34:53 +0000
+++ bash/openerp-scripts/openerp-lib.sh 2014-04-21 17:30:48 +0000
@@ -1,19 +1,19 @@
1#!/bin/bash1#!/bin/bash
22
3# openerp-lib.sh3# openerp-lib.sh
4# 4#
5# Copyright 2010 ClearCorp S.A. <info@clearcorp.co.cr>5# Copyright 2010 ClearCorp S.A. <info@clearcorp.co.cr>
6# 6#
7# This program is free software; you can redistribute it and/or modify7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.10# (at your option) any later version.
11# 11#
12# This program is distributed in the hope that it will be useful,12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.15# GNU General Public License for more details.
16# 16#
17# You should have received a copy of the GNU General Public License17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,19# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
@@ -29,7 +29,7 @@
29}29}
3030
31function openerp_get_dist {31function openerp_get_dist {
32 32
33 # Sets vars corresponding to the distro33 # Sets vars corresponding to the distro
34 if [[ $dist == "lucid" ]]; then34 if [[ $dist == "lucid" ]]; then
35 # Ubuntu 10.04, python 2.635 # Ubuntu 10.04, python 2.6
@@ -58,6 +58,26 @@
58 posgresql_rel=9.158 posgresql_rel=9.1
59 python_rel=python2.759 python_rel=python2.7
60 ubuntu_rel=12.0460 ubuntu_rel=12.04
61 elif [[ $dist == "quantal" ]]; then
62 # Ubuntu 12.10, python 2.7, postgres 9.1
63 posgresql_rel=9.1
64 python_rel=python2.7
65 ubuntu_rel=12.10
66 elif [[ $dist == "raring" ]]; then
67 # Ubuntu 13.04, python 2.7, postgres 9.1
68 posgresql_rel=9.1
69 python_rel=python2.7
70 ubuntu_rel=13.04
71 elif [[ $dist == "saucy" ]]; then
72 # Ubuntu 13.10, python 2.7, postgres 9.1
73 posgresql_rel=9.1
74 python_rel=python2.7
75 ubuntu_rel=13.10
76 elif [[ $dist == "trusty" ]]; then
77 # Ubuntu 14.04, python 2.7, postgres 9.1
78 posgresql_rel=9.1
79 python_rel=python2.7
80 ubuntu_rel=14.04
61 else81 else
62 # Only Lucid supported for now82 # Only Lucid supported for now
63 log_echo "ERROR: This program must be executed on Ubuntu 10.04 - 11.10 (Desktop or Server)"83 log_echo "ERROR: This program must be executed on Ubuntu 10.04 - 11.10 (Desktop or Server)"
@@ -109,10 +129,10 @@
109function install_python_lib {129function install_python_lib {
110 # Install the required packages and python libraries for openerp.130 # Install the required packages and python libraries for openerp.
111 echo "Installing the required packages and python libraries for openerp..."131 echo "Installing the required packages and python libraries for openerp..."
112 132
113 # Package array133 # Package array
114 declare -a packages134 declare -a packages
115 135
116 # Packages need by the installer136 # Packages need by the installer
117 packages+=(python-setuptools)137 packages+=(python-setuptools)
118138
@@ -138,7 +158,7 @@
138 if [[ $branch =~ "5.0" ]]; then158 if [[ $branch =~ "5.0" ]]; then
139 #Dependencies159 #Dependencies
140 packages+=(python-egenix-mxdatetime)160 packages+=(python-egenix-mxdatetime)
141 161
142 #Recommended162 #Recommended
143 packages+=(python-pyparsing)163 packages+=(python-pyparsing)
144 fi164 fi
@@ -162,7 +182,7 @@
162 packages+=(python-werkzeug)182 packages+=(python-werkzeug)
163 install_werkzeug=1183 install_werkzeug=1
164 packages+=(python-zsi)184 packages+=(python-zsi)
165 185
166 # Recomended186 # Recomended
167 packages+=(python-gdata) #Google data parser187 packages+=(python-gdata) #Google data parser
168 packages+=(python-ldap)188 packages+=(python-ldap)
@@ -197,18 +217,18 @@
197 # Dependencies217 # Dependencies
198 packages+=(python-werkzeug)218 packages+=(python-werkzeug)
199 install_werkzeug=1219 install_werkzeug=1
200 220
201 # Recomended221 # Recomended
202 packages+=(python-mock) # For testing222 packages+=(python-mock) # For testing
203 if [[ ! $dist =~ "lucid" ]]; then223 if [[ ! $dist =~ "lucid" ]]; then
204 packages+=(python-unittest2) # For testing224 packages+=(python-unittest2) # For testing
205 fi225 fi
206 fi226 fi
207 227
208 # Install packages228 # Install packages
209 log_echo "apt-get -qy install ${packages[*]}"229 log_echo "apt-get -qy install ${packages[*]}"
210 apt-get -qy install ${packages[*]} >> $INSTALL_LOG_FILE230 apt-get -qy install ${packages[*]} >> $INSTALL_LOG_FILE
211 231
212 # werkzeug verion in lucid is too old.232 # werkzeug verion in lucid is too old.
213 if [[ $dist =~ "lucid" ]] && [[ $install_werkzeug == 1 ]]; then233 if [[ $dist =~ "lucid" ]] && [[ $install_werkzeug == 1 ]]; then
214 easy_install -U werkzeug >> $INSTALL_LOG_FILE234 easy_install -U werkzeug >> $INSTALL_LOG_FILE
@@ -324,7 +344,7 @@
324 else344 else
325 download_repo345 download_repo
326 fi346 fi
327 347
328 if [[ $branch == "5.0" ]] || [[ $branch == "6.0" ]] || [[ $branch == "6.1" ]] || [[ $branch == "trunk" ]]; then348 if [[ $branch == "5.0" ]] || [[ $branch == "6.0" ]] || [[ $branch == "6.1" ]] || [[ $branch == "trunk" ]]; then
329 download_openerp_branch openobject-server openobject-server $branch-ccorp349 download_openerp_branch openobject-server openobject-server $branch-ccorp
330 if [[ $install_openerp_addons =~ ^[Yy]$ ]]; then350 if [[ $install_openerp_addons =~ ^[Yy]$ ]]; then
@@ -358,7 +378,7 @@
358 sed -i "s#\\[USER\\]#$openerp_user#g" /etc/openerp/$branch/server/init-$branch-skeleton >> $INSTALL_LOG_FILE378 sed -i "s#\\[USER\\]#$openerp_user#g" /etc/openerp/$branch/server/init-$branch-skeleton >> $INSTALL_LOG_FILE
359 sed -i "s#\(chown.*\)openerp:openerp#\1$openerp_user:openerp#g" /etc/openerp/$branch/server/init-$branch-skeleton >> $INSTALL_LOG_FILE379 sed -i "s#\(chown.*\)openerp:openerp#\1$openerp_user:openerp#g" /etc/openerp/$branch/server/init-$branch-skeleton >> $INSTALL_LOG_FILE
360 fi380 fi
361 381
362 # OpenERP Server config skeletons382 # OpenERP Server config skeletons
363 cp $OPENERP_CCORP_DIR/openerp-scripts/server/server.conf-$branch-skeleton /etc/openerp/$branch/server/ >> $INSTALL_LOG_FILE383 cp $OPENERP_CCORP_DIR/openerp-scripts/server/server.conf-$branch-skeleton /etc/openerp/$branch/server/ >> $INSTALL_LOG_FILE
364 sed -i "s#\\[BRANCH\\]#$branch#g" /etc/openerp/$branch/server/server.conf-$branch-skeleton >> $INSTALL_LOG_FILE384 sed -i "s#\\[BRANCH\\]#$branch#g" /etc/openerp/$branch/server/server.conf-$branch-skeleton >> $INSTALL_LOG_FILE
@@ -369,7 +389,7 @@
369 sed -i "s#\\[LOGLEVEL\\]#debug#g" /etc/openerp/$branch/server/server.conf-$branch-skeleton >> $INSTALL_LOG_FILE389 sed -i "s#\\[LOGLEVEL\\]#debug#g" /etc/openerp/$branch/server/server.conf-$branch-skeleton >> $INSTALL_LOG_FILE
370 sed -i "s#\\[DEBUGMODE\\]#True#g" /etc/openerp/$branch/server/server.conf-$branch-skeleton >> $INSTALL_LOG_FILE390 sed -i "s#\\[DEBUGMODE\\]#True#g" /etc/openerp/$branch/server/server.conf-$branch-skeleton >> $INSTALL_LOG_FILE
371 fi391 fi
372 392
373 #~ Make pid dir393 #~ Make pid dir
374 mkdir -p /var/run/openerp >> $INSTALL_LOG_FILE394 mkdir -p /var/run/openerp >> $INSTALL_LOG_FILE
375395
@@ -398,10 +418,10 @@
398 chmod -R g+w /var/log/openerp >> $INSTALL_LOG_FILE418 chmod -R g+w /var/log/openerp >> $INSTALL_LOG_FILE
399 chmod -R g+w /var/run/openerp >> $INSTALL_LOG_FILE419 chmod -R g+w /var/run/openerp >> $INSTALL_LOG_FILE
400 if ls /srv/openerp/$branch/instances/*/addons > /dev/null 1>&2; then420 if ls /srv/openerp/$branch/instances/*/addons > /dev/null 1>&2; then
401 for x in $(ls -d /srv/openerp/$branch/instances/*/addons); do421 for x in $(ls -d /srv/openerp/$branch/instances/*/addons); do
402 chmod +x $x >> $INSTALL_LOG_FILE;422 chmod +x $x >> $INSTALL_LOG_FILE;
403 done423 done
404 fi424 fi
405}425}
406426
407function install_openerp {427function install_openerp {
@@ -442,7 +462,7 @@
442 else462 else
443 sed -i "s/\[TYPE\]/production/g" /etc/openerp/$branch/web-client/web-client.conf-$branch-skeleton >> $INSTALL_LOG_FILE463 sed -i "s/\[TYPE\]/production/g" /etc/openerp/$branch/web-client/web-client.conf-$branch-skeleton >> $INSTALL_LOG_FILE
444 fi464 fi
445 465
446 #Change perms466 #Change perms
447 install_change_perms467 install_change_perms
448}468}

Subscribers

People subscribed via source and target branches