Update odoo_install.sh

pull/420/head
Mahmut Hızal 2 years ago committed by GitHub
parent 87c8ade570
commit 3796d80263
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -93,6 +93,28 @@ fi
echo -e "\n---- Creating the ODOO PostgreSQL User ----"
sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true
#--------------------------------------------------
# Check Python version and install Python 3.10 if not present
#--------------------------------------------------
echo -e "\n---- Checking for Python 3.10 installation ----"
PYTHON_VERSION=$(python3 -V 2>&1 | grep -Po '(?<=Python )(.+)')
if [[ -z "$PYTHON_VERSION" ]]; then
echo "Python 3 is not installed. Installing Python 3.10..."
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install -y python3.10
elif [[ $(printf '3.10\n%s' "$PYTHON_VERSION" | sort -V | head -n1) != "3.10" ]]; then
echo "Python 3.10 or greater is not installed. Upgrading to Python 3.10..."
sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install -y python3.10
else
echo "Python 3.10 or greater is already installed."
fi
#--------------------------------------------------
# Install Dependencies
#--------------------------------------------------

Loading…
Cancel
Save