Add support for Ubuntu 22.04 & Debian 11

This commit is contained in:
VirtuBox
2022-05-23 13:48:00 +02:00
parent 24ed5b50b2
commit 7277d3e565
2 changed files with 14 additions and 6 deletions

10
install
View File

@@ -9,7 +9,7 @@
# -------------------------------------------------------------------------
# wget -qO wo wops.cc && sudo -E bash wo
# -------------------------------------------------------------------------
# Version 3.14.2 - 2022-04-29
# Version 3.15.0 - 2022-05-23
# -------------------------------------------------------------------------
# CONTENTS
@@ -167,9 +167,9 @@ wo_check_distro() {
wo_lib_echo_fail "Feel free to open a pull-request if you want to add support for another Linux distributions"
exit 100
else
check_wo_linux_distro=$(lsb_release -sc | grep -E "xenial|bionic|jessie|stretch|buster|focal")
check_wo_linux_distro=$(lsb_release -sc | grep -E "bionic|stretch|buster|focal|jammy|bullseye")
if [ -z "$check_wo_linux_distro" ]; then
wo_lib_echo_fail "WordOps (wo) only supports Ubuntu 16.04/18.04/20.04 LTS, Debian 9.x/10.x and Raspbian 9.x/10x.\n
wo_lib_echo_fail "WordOps (wo) only supports Ubuntu 18.04/20.04/22.04 LTS, Debian 10.x/11.x and Raspbian 10x./11.x \n
You can bypass this warning by adding the flag --force to the install command"
exit 100
fi
@@ -455,6 +455,8 @@ wo_install() {
if [ "$wo_linux_distro" = "Debian" ] || [ "$wo_linux_distro" = "Raspbian" ]; then
if [ "$wo_distro_codename" = "stretch" ]; then
python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.4.y#egg=python-apt
elif [ "$wo_distro_codename" = "bullseye" ]; then
python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.2.1#egg=python-apt
else
python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.8.4.y#egg=python-apt
fi
@@ -463,6 +465,8 @@ wo_install() {
python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.0.0#egg=python-apt
elif [ "$wo_distro_codename" = "bionic" ]; then
python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.6.y#egg=python-apt
elif [ "$wo_distro_codename" = "jammy" ]; then
python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@2.2.1#egg=python-apt
else
python3 -m pip install git+https://salsa.debian.org/apt-team/python-apt.git@1.1.y-xenial#egg=python-apt
fi

View File

@@ -14,7 +14,7 @@ class WOVar():
"""Intialization of core variables"""
# WordOps version
wo_version = "3.14.2"
wo_version = "3.15.0"
# WordOps packages versions
wo_wp_cli = "2.6.0"
wo_adminer = "4.8.1"
@@ -123,11 +123,15 @@ class WOVar():
wo_deb_repo = "Debian_9.0"
elif wo_platform_codename == 'buster':
wo_deb_repo = "Debian_10"
elif wo_platform_codename == 'bullseye':
wo_deb_repo = "Debian_11"
elif wo_distro == 'raspbian':
if wo_platform_codename == 'stretch':
wo_deb_repo = "Raspbian_9.0"
elif wo_platform_codename == 'buster':
wo_deb_repo = "Raspbian_10"
elif wo_platform_codename == 'bullseye':
wo_deb_repo = "Raspbian_11"
# debian/raspbian nginx repository
wo_nginx_repo = ("deb http://download.opensuse.org"
"/repositories/home:"
@@ -171,7 +175,7 @@ class WOVar():
else:
mariadb_ver = '10.3'
else:
mariadb_ver = '10.5'
mariadb_ver = '10.6'
wo_mysql = wo_mysql + ["mariadb-backup"]
wo_mysql_client = ["mariadb-client", "python3-mysqldb"]
@@ -183,7 +187,7 @@ class WOVar():
# APT repositories
wo_mysql_repo = ("deb [arch=amd64,arm64,ppc64el] "
"http://mariadb.mirrors.ovh.net/MariaDB/repo/"
"10.5/{distro} {codename} main"
"10.6/{distro} {codename} main"
.format(distro=wo_distro,
codename=wo_platform_codename))
if wo_distro == 'ubuntu':