#!/bin/zsh # TODO change to a pure python3 script installed with setup.py as an entrypoint # vim: set shiftwidth=4 softtabstop=4: # Create the file odoo_modules_list from setup.cfg # template version 2.7 here=$(dirname $0) project_home=$(cd $here && cd .. && echo $PWD) if type "python3" > /dev/null; then python3 -B -c "import configparser ; c = configparser.ConfigParser() ; c.read('${project_home}/setup.cfg') ; print(','.join(c.get('odoo_scripts', 'module_list').split()))" > $project_home/odoo_modules_list else python2 -B -c "import ConfigParser ; c = ConfigParser.SafeConfigParser() ; c.read('${project_home}/setup.cfg') ; print(','.join(c.get('odoo_scripts', 'module_list').split()))" > $project_home/odoo_modules_list fi