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

:ambulance: correctly handle new line character in python setup file for docker build copy

parent 9c2698822ff9
No related branches found
No related tags found
No related merge requests found
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
# TODO add a way to bypass the value, maybe with a key in the setup.cfg file # TODO add a way to bypass the value, maybe with a key in the setup.cfg file
here=$(dirname $0) here=$(dirname $0)
project_home=$(cd $here && cd .. && echo $PWD) project_home=$(cd $here && cd .. && echo $PWD)
odoo_modules="$(python -B -c "import ConfigParser ; c = ConfigParser.SafeConfigParser() ; c.read('${project_home}/setup.cfg') ; print (c.has_option('odoo_scripts', 'modules') and c.get('odoo_scripts', 'modules') or '')")" odoo_modules="$(python -B -c "import ConfigParser ; c = ConfigParser.SafeConfigParser() ; c.read('${project_home}/setup.cfg') ; print (c.has_option('odoo_scripts', 'modules') and ' '.join(c.get('odoo_scripts', 'modules').split()) or '')")"
mkdir -p $project_home/odoo_modules mkdir -p $project_home/odoo_modules
# Copy modules when specified # Copy modules when specified
if [[ -n "$odoo_modules" ]]; if [[ -n "$odoo_modules" ]];
then then
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
mkdir -p $project_home/odoo_modules mkdir -p $project_home/odoo_modules
# Copy modules when specified # Copy modules when specified
if [[ -n "$odoo_modules" ]]; if [[ -n "$odoo_modules" ]];
then then
rsync --delete -C --exclude='.hg*' --links --exclude='*.pyc' -r --times $(eval "echo $odoo_modules") $project_home/odoo_modules rsync --delete -C --exclude='.hg*' --exclude='.git*' --links --exclude='*.pyc' -r --times $(eval echo $odoo_modules) $project_home/odoo_modules
fi fi
exit $? exit $?
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