You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
620 B

  1. #!/bin/bash
  2. set -e
  3. # make sure odoo has a user.name configured, as merges would not succeed otherwise
  4. # (even if GIT_AUTHOR_NAME and EMAIL are set and should be used, it seems gitaggregate is not passing them to git)
  5. su --shell="$SHELL" odoo -c 'git config user.name 1>/dev/null || git config --global user.name "'"$GIT_AUTHOR_NAME"'"'
  6. # copy ssh directory to odoo user as well (gitaggregate may also be run as odoo user)
  7. if [[ ! -e ~odoo/.ssh ]] ; then
  8. cp -a /opt/odoo/custom/ssh ~odoo/.ssh
  9. fi
  10. if [ "$AGGREGATE" != true ]; then
  11. log WARNING Not aggregating code repositories
  12. exit 0
  13. fi
  14. exec autoaggregate