Skip to content
Snippets Groups Projects
Commit 52e10ee3260c authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:zap: drop support for bzr style odoo

parent eeda6a70ac8f
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@
It expect the configuration file (`setup.cfg`_) to have the following keys:
- ``odoo_type``: type of odoo (bzr, odoo7, odoo8 or odoo10) [default to odoo8]
- ``odoo_type``: type of odoo (odoo7, odoo8, odoo10 or odoo11) [default to odoo8]. The environment variable ODOO_TYPE can be used instead.
- ``modules``: list of directories and files to include (also used by another script)
......
......@@ -14,7 +14,7 @@
else
python="python2"
fi
# odoo7, odoo8, odoo10, odoo11 or bzr
# odoo7, odoo8, odoo10, odoo11
ODOO_TYPE=${ODOO_TYPE:-$($python -B -c "from six.moves import configparser ; c = configparser.ConfigParser() ; c.read('${project_home}/setup.cfg') ; print(c.get('odoo_scripts', 'odoo_type') if c.has_option('odoo_scripts', 'odoo_type') else 'odoo8')")}
load_language=$($python -B -c "from six.moves import configparser ; c = configparser.ConfigParser() ; c.read('${project_home}/setup.cfg') ; print(c.get('odoo_scripts', 'load-language') if c.has_option('odoo_scripts', 'load-language') else '')")
......@@ -121,21 +121,16 @@
then
addons_path=""
else
if [ "$ODOO_TYPE" = "bzr" ];
then
addons_path="--addons-path=$($python -B -c "from six.moves import configparser ; import os ; c = configparser.ConfigParser() ; c.read('${project_home}/setup.cfg') ; print(','.join(['$HOME/src/openobject-server/openerp/addons','$HOME/src/openobject-addons','$HOME/src/openerp-web/addons']+['${project_home}/'+line for line in set(os.path.dirname(path) for path in c.get('odoo_scripts', 'modules').split())]))")"
else
if [ "$ODOO_TYPE" = "odoo7" ] || [ "$ODOO_TYPE" = "odoo8" ];
then
pathes=$($python -B -c "from six.moves import configparser ; import os ; c = configparser.ConfigParser() ; c.read('${project_home}/setup.cfg') ; print(','.join(['$odoo_addons_path/addons']+['${project_home}/'+line for line in set(os.path.dirname(path) for path in c.get('odoo_scripts', 'modules').split())]))")
else
pathes=$($python -B -c "from six.moves import configparser ; import os ; c = configparser.ConfigParser() ; c.read('${project_home}/setup.cfg') ; print(','.join(['${project_home}/'+line for line in set(os.path.dirname(path) for path in c.get('odoo_scripts', 'modules').split())]))")
fi
if [ -n "$pathes" ];
then
addons_path="--addons-path=$pathes"
fi
fi
if [ "$ODOO_TYPE" = "odoo7" ] || [ "$ODOO_TYPE" = "odoo8" ];
then
pathes=$($python -B -c "from six.moves import configparser ; import os ; c = configparser.ConfigParser() ; c.read('${project_home}/setup.cfg') ; print(','.join(['$odoo_addons_path/addons']+['${project_home}/'+line for line in set(os.path.dirname(path) for path in c.get('odoo_scripts', 'modules').split())]))")
else
pathes=$($python -B -c "from six.moves import configparser ; import os ; c = configparser.ConfigParser() ; c.read('${project_home}/setup.cfg') ; print(','.join(['${project_home}/'+line for line in set(os.path.dirname(path) for path in c.get('odoo_scripts', 'modules').split())]))")
fi
if [ -n "$pathes" ];
then
addons_path="--addons-path=$pathes"
fi
fi
fi
# use load-language from setup.cfg
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment