Update install.sh

This commit is contained in:
quydang 2023-09-16 14:11:08 +07:00 committed by GitHub
parent 4f46121d7b
commit 6671389a84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,12 +26,12 @@ cur_dir=$(pwd)
[[ $EUID -ne 0 ]] && echo -e "${red}Fatal error: ${plain} this script must be run as root user " && exit 1
# Check OS and set release variable
REGEX=("debian" "ubuntu" "centos|red hat|kernel|oracle linux|alma|rocky" "'amazon linux'" "fedora", "alpine", "arch")
RELEASE=("Debian" "Ubuntu" "CentOS" "CentOS" "Fedora" "Alpine", "ArchLinux")
PACKAGE_UPDATE=("apt-get update" "apt-get update" "yum -y update" "yum -y update" "yum -y update" "apk update -f", "pacman -Syu")
PACKAGE_INSTALL=("apt -y install" "apt -y install" "yum -y install" "yum -y install" "yum -y install" "apk add -f", "pacman -S")
PACKAGE_REMOVE=("apt -y remove" "apt -y remove" "yum -y remove" "yum -y remove" "yum -y remove" "apk del -f", "pacman -Rns")
PACKAGE_UNINSTALL=("apt -y autoremove" "apt -y autoremove" "yum -y autoremove" "yum -y autoremove" "yum -y autoremove" "apk del -f", "pacman -Rns")
REGEX=("debian" "ubuntu" "centos|red hat|kernel|oracle linux|alma|rocky" "'amazon linux'" "fedora", "alpine", "arch", "manjaro")
RELEASE=("Debian" "Ubuntu" "CentOS" "CentOS" "Fedora" "Alpine", "ArchLinux", "Manjaro")
PACKAGE_UPDATE=("apt-get update" "apt-get update" "yum -y update" "yum -y update" "yum -y update" "apk update -f", "pacman -Syu", "pacman -Syu")
PACKAGE_INSTALL=("apt -y install" "apt -y install" "yum -y install" "yum -y install" "yum -y install" "apk add -f", "pacman -S", "pacman -S")
PACKAGE_REMOVE=("apt -y remove" "apt -y remove" "yum -y remove" "yum -y remove" "yum -y remove" "apk del -f", "pacman -Rns", "pacman -Rns")
PACKAGE_UNINSTALL=("apt -y autoremove" "apt -y autoremove" "yum -y autoremove" "yum -y autoremove" "yum -y autoremove" "apk del -f", "pacman -Rns", "pacman -Rns")
[[ $EUID -ne 0 ]] && red "This script must be run as root user" && exit 1
@ -55,6 +55,7 @@ os_version=$(grep -i version_id /etc/os-release | cut -d \" -f2 | cut -d . -f1)
[[ $SYSTEM == "Ubuntu" && ${os_version} -lt 20 ]] && echo -e "Please use Ubuntu 20 or higher version system!" && exit 1
[[ $SYSTEM == "Debian" && ${os_version} -lt 10 ]] && echo -e "Please use Debian 10 or higher version system!" && exit 1
[[ $SYSTEM == "ArchLinux" ]] && echo -e "Your OS is ArchLinux!"
[[ $SYSTEM == "Manjaro" ]] && echo -e "Your OS is Manjaro!"
archxui(){
case "$(uname -m)" in