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
1=== modified file 'bash/openerp-scripts/openerp-lib.sh'
2--- bash/openerp-scripts/openerp-lib.sh 2013-02-18 17:34:53 +0000
3+++ bash/openerp-scripts/openerp-lib.sh 2014-04-21 17:30:48 +0000
4@@ -1,19 +1,19 @@
5 #!/bin/bash
6
7 # openerp-lib.sh
8-#
9+#
10 # Copyright 2010 ClearCorp S.A. <info@clearcorp.co.cr>
11-#
12+#
13 # This program is free software; you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation; either version 2 of the License, or
16 # (at your option) any later version.
17-#
18+#
19 # This program is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
23-#
24+#
25 # You should have received a copy of the GNU General Public License
26 # along with this program; if not, write to the Free Software
27 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
28@@ -29,7 +29,7 @@
29 }
30
31 function openerp_get_dist {
32-
33+
34 # Sets vars corresponding to the distro
35 if [[ $dist == "lucid" ]]; then
36 # Ubuntu 10.04, python 2.6
37@@ -58,6 +58,26 @@
38 posgresql_rel=9.1
39 python_rel=python2.7
40 ubuntu_rel=12.04
41+ elif [[ $dist == "quantal" ]]; then
42+ # Ubuntu 12.10, python 2.7, postgres 9.1
43+ posgresql_rel=9.1
44+ python_rel=python2.7
45+ ubuntu_rel=12.10
46+ elif [[ $dist == "raring" ]]; then
47+ # Ubuntu 13.04, python 2.7, postgres 9.1
48+ posgresql_rel=9.1
49+ python_rel=python2.7
50+ ubuntu_rel=13.04
51+ elif [[ $dist == "saucy" ]]; then
52+ # Ubuntu 13.10, python 2.7, postgres 9.1
53+ posgresql_rel=9.1
54+ python_rel=python2.7
55+ ubuntu_rel=13.10
56+ elif [[ $dist == "trusty" ]]; then
57+ # Ubuntu 14.04, python 2.7, postgres 9.1
58+ posgresql_rel=9.1
59+ python_rel=python2.7
60+ ubuntu_rel=14.04
61 else
62 # Only Lucid supported for now
63 log_echo "ERROR: This program must be executed on Ubuntu 10.04 - 11.10 (Desktop or Server)"
64@@ -109,10 +129,10 @@
65 function install_python_lib {
66 # Install the required packages and python libraries for openerp.
67 echo "Installing the required packages and python libraries for openerp..."
68-
69+
70 # Package array
71 declare -a packages
72-
73+
74 # Packages need by the installer
75 packages+=(python-setuptools)
76
77@@ -138,7 +158,7 @@
78 if [[ $branch =~ "5.0" ]]; then
79 #Dependencies
80 packages+=(python-egenix-mxdatetime)
81-
82+
83 #Recommended
84 packages+=(python-pyparsing)
85 fi
86@@ -162,7 +182,7 @@
87 packages+=(python-werkzeug)
88 install_werkzeug=1
89 packages+=(python-zsi)
90-
91+
92 # Recomended
93 packages+=(python-gdata) #Google data parser
94 packages+=(python-ldap)
95@@ -197,18 +217,18 @@
96 # Dependencies
97 packages+=(python-werkzeug)
98 install_werkzeug=1
99-
100+
101 # Recomended
102 packages+=(python-mock) # For testing
103 if [[ ! $dist =~ "lucid" ]]; then
104 packages+=(python-unittest2) # For testing
105 fi
106 fi
107-
108+
109 # Install packages
110 log_echo "apt-get -qy install ${packages[*]}"
111 apt-get -qy install ${packages[*]} >> $INSTALL_LOG_FILE
112-
113+
114 # werkzeug verion in lucid is too old.
115 if [[ $dist =~ "lucid" ]] && [[ $install_werkzeug == 1 ]]; then
116 easy_install -U werkzeug >> $INSTALL_LOG_FILE
117@@ -324,7 +344,7 @@
118 else
119 download_repo
120 fi
121-
122+
123 if [[ $branch == "5.0" ]] || [[ $branch == "6.0" ]] || [[ $branch == "6.1" ]] || [[ $branch == "trunk" ]]; then
124 download_openerp_branch openobject-server openobject-server $branch-ccorp
125 if [[ $install_openerp_addons =~ ^[Yy]$ ]]; then
126@@ -358,7 +378,7 @@
127 sed -i "s#\\[USER\\]#$openerp_user#g" /etc/openerp/$branch/server/init-$branch-skeleton >> $INSTALL_LOG_FILE
128 sed -i "s#\(chown.*\)openerp:openerp#\1$openerp_user:openerp#g" /etc/openerp/$branch/server/init-$branch-skeleton >> $INSTALL_LOG_FILE
129 fi
130-
131+
132 # OpenERP Server config skeletons
133 cp $OPENERP_CCORP_DIR/openerp-scripts/server/server.conf-$branch-skeleton /etc/openerp/$branch/server/ >> $INSTALL_LOG_FILE
134 sed -i "s#\\[BRANCH\\]#$branch#g" /etc/openerp/$branch/server/server.conf-$branch-skeleton >> $INSTALL_LOG_FILE
135@@ -369,7 +389,7 @@
136 sed -i "s#\\[LOGLEVEL\\]#debug#g" /etc/openerp/$branch/server/server.conf-$branch-skeleton >> $INSTALL_LOG_FILE
137 sed -i "s#\\[DEBUGMODE\\]#True#g" /etc/openerp/$branch/server/server.conf-$branch-skeleton >> $INSTALL_LOG_FILE
138 fi
139-
140+
141 #~ Make pid dir
142 mkdir -p /var/run/openerp >> $INSTALL_LOG_FILE
143
144@@ -398,10 +418,10 @@
145 chmod -R g+w /var/log/openerp >> $INSTALL_LOG_FILE
146 chmod -R g+w /var/run/openerp >> $INSTALL_LOG_FILE
147 if ls /srv/openerp/$branch/instances/*/addons > /dev/null 1>&2; then
148- for x in $(ls -d /srv/openerp/$branch/instances/*/addons); do
149- chmod +x $x >> $INSTALL_LOG_FILE;
150- done
151- fi
152+ for x in $(ls -d /srv/openerp/$branch/instances/*/addons); do
153+ chmod +x $x >> $INSTALL_LOG_FILE;
154+ done
155+ fi
156 }
157
158 function install_openerp {
159@@ -442,7 +462,7 @@
160 else
161 sed -i "s/\[TYPE\]/production/g" /etc/openerp/$branch/web-client/web-client.conf-$branch-skeleton >> $INSTALL_LOG_FILE
162 fi
163-
164+
165 #Change perms
166 install_change_perms
167 }

Subscribers

People subscribed via source and target branches