From ee401b22a7a0ccdc1bb4313207a7d40d778aacf1 Mon Sep 17 00:00:00 2001 From: Alexandre Ferreira Benevides Date: Sat, 25 Feb 2023 23:52:05 -0500 Subject: [PATCH] [FIX] install OSX: limit hard run.sh and source activate Signed-off-by: Alexandre Ferreira Benevides --- run.sh | 2 +- script/install/install_OSX_dependency.sh | 6 +++--- script/install/install_locally.sh | 5 ++++- script/manifest/update_manifest_local_dev.sh | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/run.sh b/run.sh index 1659f04..f797576 100755 --- a/run.sh +++ b/run.sh @@ -11,7 +11,7 @@ if [ ! -f "${CONFIG_PATH}" ]; then fi fi -python3 ./odoo/odoo-bin -c ${CONFIG_PATH} --limit-time-real 99999 --limit-time-cpu 99999 $@ +python3 ./odoo/odoo-bin -c ${CONFIG_PATH} --limit-time-real 99999 --limit-time-cpu 99999 --limit-memory-hard=0 "$@" retVal=$? if [[ $retVal -ne 0 ]]; then echo "Error run.sh" diff --git a/script/install/install_OSX_dependency.sh b/script/install/install_OSX_dependency.sh index 8319814..f82bed9 100755 --- a/script/install/install_OSX_dependency.sh +++ b/script/install/install_OSX_dependency.sh @@ -13,9 +13,9 @@ EL_USER=${USER} # Install PostgreSQL Server #-------------------------------------------------- echo "\n---- Install PostgreSQL Server ----" -brew install postgresql +brew install postgresql@15 brew install postgis -brew services start postgresql +brew services start postgresql@15 echo "\n---- Creating the ERPLibre PostgreSQL User ----" sudo su - postgres -c "createuser -s ${EL_USER}" 2> /dev/null || true @@ -25,7 +25,7 @@ sudo su - postgres -c "CREATE EXTENSION postgis;\nCREATE EXTENSION postgis_topol # Install Dependencies #-------------------------------------------------- echo "\n--- Installing Python 3 + pip3 --" -brew install git python3 wget +brew install git python@3.7 wget parallel mariadb brew link git brew link wget diff --git a/script/install/install_locally.sh b/script/install/install_locally.sh index ac1c7cb..506a390 100755 --- a/script/install/install_locally.sh +++ b/script/install/install_locally.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash . ./env_var.sh - +source .venv/bin/activate EL_USER=${USER} EL_HOME=$PWD EL_HOME_ODOO="${EL_HOME}/odoo" @@ -94,6 +94,9 @@ if [[ ! -f ${VENV_REPO_PATH} ]]; then sed -i "1 i ${PYTHON_HASHBANG}" ${VENV_REPO_PATH} fi +# Make .venv active +source .venv/bin/activate + # Install Multilingual Markdown Generator if missing if [[ ! -f ${VENV_MULTILINGUAL_MARKDOWN_PATH} ]]; then echo "\n---- Install Multilingual Markdown Generator ----" diff --git a/script/manifest/update_manifest_local_dev.sh b/script/manifest/update_manifest_local_dev.sh index b9ccb75..58a7d57 100755 --- a/script/manifest/update_manifest_local_dev.sh +++ b/script/manifest/update_manifest_local_dev.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash . ./env_var.sh - +source .venv/bin/activate #EL_MANIFEST_PROD="./default.xml" #EL_MANIFEST_DEV="./manifest/default.dev.xml"