Created
August 1, 2019 08:20
-
-
Save gurneyalex/5cfc100dd03e9a21bb4319e004a174b0 to your computer and use it in GitHub Desktop.
odoo-bin wrapper which computes addons path and creates the config file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ROOT=$(dirname $0)/.. | |
CONF=${ROOT}/odoo.conf | |
ODOODIR=${ROOT}/src | |
ODOOBIN="${ODOODIR}/odoo-bin --config=${CONF}" | |
ADDONS_PATH=${ROOT}/local-src,${ROOT}/external-src/enterprise,${ODOODIR}/odoo/addons,${ODOODIR}/addons | |
for d in ${ROOT}/external-src/* | |
do | |
if [ $d != enterprise ] | |
then | |
ADDONS_PATH=${ADDONS_PATH},$d | |
fi | |
done | |
if [ ! -f ${CONF} ] | |
then | |
echo "generating a default config" | |
${ODOOBIN} --save --addons-path=${ADDONS_PATH} --stop-after-init --proxy-mode --without-demo=all --list-db=False "$@" | |
exit 0 | |
fi | |
${ODOOBIN} --addons-path=${ADDONS_PATH} "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment