From 9e02361f3164ce46531abe69718cb72be83da475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20Adolfo=20Mesa=20Rold=C3=A1n?= Date: Sat, 3 Oct 2020 12:43:40 +0200 Subject: [PATCH] 0.6r4 - rpm init --- lib/installers/rpm.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/installers/rpm.sh b/lib/installers/rpm.sh index c97ee1f..343a0ed 100644 --- a/lib/installers/rpm.sh +++ b/lib/installers/rpm.sh @@ -8,12 +8,25 @@ function get_dep(){ if [[ $@ -ne "p7zip-plugins" ]]; then complete_install $@; fi } +function install_centos(){ + if [ -n "$(grep "centos" /etc/*-release)" ]; then + yum install -y -q epel-release 1> /dev/null + rpm -U --quiet http://mirrors.kernel.org/fedora-epel/6/i386/epel-release-6-8.noarch.rpm 1> /dev/null + rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 1> /dev/null + yum repolist 1> /dev/null + fi +} + + + # Run echo -e "APT system detected" echo "---------------------" + if [ $# -eq 1 ]; then + install_centos if $PRIVSOFT; then rarInstall fi @@ -34,6 +47,7 @@ else rarInstall ;; "7z" | "7zip" | "p7zip") + install_centos get_dep p7zip get_dep p7zip-plugins ;;