diff --git a/README.rst b/README.rst index eeda6a70ac8faadfc2cc23eec463621b68627c13_UkVBRE1FLnJzdA==..52e10ee3260cec276b26a2fabb3246b5300e6ab5_UkVBRE1FLnJzdA== 100644 --- a/README.rst +++ b/README.rst @@ -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) diff --git a/start b/start index eeda6a70ac8faadfc2cc23eec463621b68627c13_c3RhcnQ=..52e10ee3260cec276b26a2fabb3246b5300e6ab5_c3RhcnQ= 100755 --- a/start +++ b/start @@ -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