2020-06-22 22:36:54 -04:00
|
|
|
#!/usr/bin/env bash
|
2020-04-13 00:06:13 -04:00
|
|
|
################################################################################
|
2020-06-22 22:36:54 -04:00
|
|
|
# Script for installing ERPLibre on OSX
|
2020-04-13 00:06:13 -04:00
|
|
|
# Author: Alexandre Ferreira Benevides
|
|
|
|
|
#-------------------------------------------------------------------------------
|
2020-06-22 22:36:54 -04:00
|
|
|
# This script will install dependency for ERPLibre on your OSX server.
|
2020-04-13 00:06:13 -04:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
################################################################################
|
|
|
|
|
|
2020-07-24 02:20:30 -04:00
|
|
|
EL_USER=${USER}
|
2020-04-13 00:06:13 -04:00
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
|
# Install PostgreSQL Server
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
|
echo "\n---- Install PostgreSQL Server ----"
|
|
|
|
|
brew install postgresql
|
|
|
|
|
|
2020-06-22 22:36:54 -04:00
|
|
|
echo "\n---- Creating the ERPLibre PostgreSQL User ----"
|
|
|
|
|
sudo su - postgres -c "createuser -s ${EL_USER}" 2> /dev/null || true
|
2020-04-13 00:06:13 -04:00
|
|
|
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
|
# Install Dependencies
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
|
echo "\n--- Installing Python 3 + pip3 --"
|
2020-07-23 17:03:59 -04:00
|
|
|
brew install git python3 wget pyenv
|
2020-04-13 00:06:13 -04:00
|
|
|
brew link git
|
|
|
|
|
brew link wget
|
2020-07-29 18:12:06 -04:00
|
|
|
echo "\n--- Installing docker --"
|
|
|
|
|
brew install minikube docker docker-compose docker-machine
|
|
|
|
|
brew cask install virtualbox
|
|
|
|
|
docker-machine create --driver virtualbox default
|
|
|
|
|
docker-machine env default
|
|
|
|
|
eval "$(docker-machine env default)"
|
2020-04-13 00:06:13 -04:00
|
|
|
echo "\n---- Installing nodeJS NPM and rtlcss for LTR support ----"
|
2020-07-24 02:20:30 -04:00
|
|
|
brew install nodejs npm openssl
|
2020-04-13 00:06:13 -04:00
|
|
|
sudo npm install -g rtlcss
|
2020-10-04 15:25:10 -04:00
|
|
|
sudo npm install -g less
|
2021-03-22 04:22:50 -04:00
|
|
|
sudo npm install -g prettier
|
2021-04-23 22:33:58 -04:00
|
|
|
sudo npm install -g prettier @prettier/plugin-xml
|
2020-07-24 02:20:30 -04:00
|
|
|
yes n|pyenv install 3.7.7
|
2020-07-23 17:03:59 -04:00
|
|
|
pyenv local 3.7.7
|
2020-07-24 02:20:30 -04:00
|
|
|
|
|
|
|
|
echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc
|
|
|
|
|
|
|
|
|
|
echo -e "\n---- Installing poetry for reliable python package ----"
|
|
|
|
|
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
|
|
|
|
|
|
2020-04-13 00:06:13 -04:00
|
|
|
#--------------------------------------------------
|
|
|
|
|
# Install Wkhtmltopdf if needed
|
|
|
|
|
#--------------------------------------------------
|
|
|
|
|
echo "\n---- Installing Wkhtmltopdf if needed ----"
|
2020-11-10 18:51:00 -05:00
|
|
|
if [ ! -f "wkhtmltox-0.12.6-1.macos-cocoa.pkg" ]; then
|
|
|
|
|
sudo wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.macos-cocoa.pkg
|
|
|
|
|
sudo sudo installer -pkg wkhtmltox-0.12.6-1.macos-cocoa.pkg -target /
|
2020-04-13 00:06:13 -04:00
|
|
|
else echo "Wkhtmltopdf already installed"
|
|
|
|
|
fi
|