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 ;;