61 lines
1.7 KiB
Bash
61 lines
1.7 KiB
Bash
# este script fuerza que los cambios se vean reflejados
|
|
# directamente en trytond.
|
|
#
|
|
# variables exportadas:
|
|
# - module_name
|
|
|
|
[ ! -d "$SRC" ] && die "no se ubica ruta en SRC"
|
|
|
|
# dependencias minimas
|
|
pip3 install psycopg2 proteus==7.0.0 inotify honcho qrcode==6.1 pyshp==2.3.1 shapely==2.0.2 scipy==1.13.1 matplotlib==3.9.0
|
|
|
|
pip3 install trytond-country==7.0.0\
|
|
trytond-company==7.0.0\
|
|
trytond-party==7.0.0 \
|
|
trytond-company==7.0.0\
|
|
trytond-currency==7.0.0\
|
|
trytond-account_product==7.0.0\
|
|
trytond-account_invoice_stock==7.0.0\
|
|
trytond-account_stock_continental==7.0.0\
|
|
trytond-account_statement==7.0.0\
|
|
trytond-bank==7.0.0\
|
|
trytond-product==7.0.0\
|
|
trytond-purchase==7.0.0\
|
|
trytond-sale==7.0.0\
|
|
|
|
module_names=()
|
|
|
|
for module in modules/*/; do
|
|
|
|
pushd "$module"
|
|
|
|
# instalar dependencias de tryton desde paquete
|
|
python3 setup.py install
|
|
|
|
# usamos enlace al paquete
|
|
python3 setup.py develop
|
|
|
|
# instalar modulo
|
|
trytond_modules_path=`pip3 show trytond | grep Location | sed -nr 's/Location: +//gp'`/trytond/modules
|
|
module_name=`cat "setup.py" | fgrep -A 1 [trytond.modules] | sed 1d | cut -d '=' -f 1 | tr -d ' \n'`
|
|
|
|
# Añadir el nombre del módulo al arreglo
|
|
module_names+=("$module_name")
|
|
|
|
[ ! -d "$trytond_modules_path" ] && die "fallo al ubicar ruta de modulos de trytond"
|
|
ln -sf "$SRC/$module" "$trytond_modules_path/$module_name"
|
|
rm -rf "$SRC/$module/$module_name"
|
|
|
|
popd
|
|
|
|
done
|
|
|
|
trytond_path=`pip3 show trytond | grep Location | sed -nr 's/Location: +//gp'`/trytond
|
|
|
|
module_names=$(IFS=:; echo "${module_names[*]}")
|
|
|
|
|
|
if [ -d "locale_custom" ]; then
|
|
cp -f "locale_custom/ir/pt.po" "$trytond_path/ir/locale/"
|
|
fi
|