Update 'mysql-8.0.sh'
This commit is contained in:
31
mysql-8.0.sh
31
mysql-8.0.sh
@@ -2,16 +2,43 @@
|
||||
# MySQL 8.0 Installer #
|
||||
###########################
|
||||
|
||||
|
||||
##-----------------##
|
||||
# Defining Vars #
|
||||
##-----------------##
|
||||
|
||||
#Enforcing Legacy Mode
|
||||
if [ -z ${PKGM+x} ]; then PKGM="apt" ; fi
|
||||
if [ -z ${OUTPUT+x} ]; then OUTPUT='/dev/tty' ; fi
|
||||
if [ -z ${IMODE+x} ]; then IMODE=l ; fi
|
||||
|
||||
#OS Detect
|
||||
|
||||
dist_ver=$(grep --color=never -Po "^VERSION_ID=\K.*" "/etc/os-release")
|
||||
dist=$(grep --color=never -Po "^ID=\K.*" "/etc/os-release")
|
||||
|
||||
echo "input: $dist $dist_ver"
|
||||
|
||||
if [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"18.04"* ]]; then
|
||||
echo "Ubuntu 18.04 Detected"
|
||||
PKGM="apt"
|
||||
shortdist=ubu1804
|
||||
elif [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"20.04"* ]]; then
|
||||
echo "Ubuntu 20.04 Detected"
|
||||
PKGM="apt"
|
||||
shortdist=ubu2004
|
||||
elif [[ "${dist}" == *"debian"* ]] && [[ "${dist_ver}" == *"10"* ]]; then
|
||||
PKGM="apt"
|
||||
echo "Debian 10 Detected"
|
||||
shortdist=deb10
|
||||
elif [[ "${dist}" == *"centos"* ]] && [[ "${dist_ver}" == *"8"* ]]; then
|
||||
echo "Centos 8 Detected"
|
||||
PKGM="dnf"
|
||||
shortdist=cent10
|
||||
else
|
||||
echo "This os in not supported"
|
||||
fi
|
||||
|
||||
unset dist_ver
|
||||
unset dist
|
||||
|
||||
|
||||
#Repo Vars
|
||||
|
||||
Reference in New Issue
Block a user