[UPD] script OSX: check before isntall psql, add source activate install
This commit is contained in:
parent
f5823fb0eb
commit
782896b230
2 changed files with 12 additions and 4 deletions
|
|
@ -13,9 +13,13 @@ EL_USER=${USER}
|
|||
# Install PostgreSQL Server
|
||||
#--------------------------------------------------
|
||||
echo "\n---- Install PostgreSQL Server ----"
|
||||
brew install postgresql@15
|
||||
brew install postgis
|
||||
brew services start postgresql@15
|
||||
if which psql >/dev/null 2>&1; then
|
||||
echo "postgresql is already installed, skipping"
|
||||
else
|
||||
brew install postgresql@15
|
||||
brew install postgis
|
||||
brew services start postgresql@15
|
||||
fi
|
||||
|
||||
echo "\n---- Creating the ERPLibre PostgreSQL User ----"
|
||||
sudo su - postgres -c "createuser -s ${EL_USER}" 2> /dev/null || true
|
||||
|
|
@ -25,6 +29,7 @@ sudo su - postgres -c "CREATE EXTENSION postgis;\nCREATE EXTENSION postgis_topol
|
|||
# Install Dependencies
|
||||
#--------------------------------------------------
|
||||
echo "\n--- Installing Python 3 + pip3 --"
|
||||
#TODO is python@3.7 line here still usefull?? Should we get rid of it?
|
||||
brew install git python@3.7 wget parallel mariadb
|
||||
brew link git
|
||||
brew link wget
|
||||
|
|
|
|||
|
|
@ -106,7 +106,10 @@ if [[ ! -f ${VENV_REPO_PATH} ]]; then
|
|||
fi
|
||||
|
||||
# Make .venv active
|
||||
|
||||
if [[ "${OSTYPE}" == "darwin"* ]]; then
|
||||
echo -e "=======>source .venv/bin/activate here!!! <==============="
|
||||
source .venv/bin/activate
|
||||
fi
|
||||
echo -e "\n---- Installing poetry dependency ----"
|
||||
${VENV_PATH}/bin/pip install --upgrade pip
|
||||
# Force python instead of changing env
|
||||
|
|
|
|||
Loading…
Reference in a new issue