This commit is contained in:
Gustavo Adolfo Mesa Roldán
2020-10-03 12:15:05 +02:00
parent 91cae2b675
commit 54194e3b89
5 changed files with 72 additions and 20 deletions
@@ -26,7 +26,7 @@ if [ $# -eq 1 ]; then
else
for i in $@
do
if [ $i != "-i" ]
if [ $i -ne "-i" ]
then
case $i in
"rar" | "unrar")
+65
View File
@@ -0,0 +1,65 @@
#!/usr/bin/env bash
# Function
function get_dep(){
# Busca la manera de capturar el error. Y mostrar mensaje en rojo.
yum install -y -q $@ 1> /dev/null
if [[ $@ -ne "p7zip-plugins" ]]; then complete_install $@; fi
}
# Run
echo -e "APT system detected"
echo "---------------------"
if [ $# -eq 1 ]; then
if $PRIVSOFT; then
rarInstall
fi
get_dep tar
get_dep bzip2
get_dep gzip
get_dep zip
get_dep unzip
get_dep p7zip
get_dep p7zip-plugins
else
for i in $@
do
if [ $i -ne "-i" ]
then
case $i in
"rar" | "unrar")
rarInstall
;;
"7z" | "7zip" | "p7zip")
get_dep p7zip
get_dep p7zip-plugins
;;
*)
get_dep $i
;;
esac
fi
done
fi
# [ -n "$(grep "centos" /etc/*-release)" ]
# echo -e "CentOS system detected"
# 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
# yum install -y -q tar bzip2 gzip zip unzip p7zip p7zip-plugins 1> /dev/null
# elif
# then
# echo -e "DNF system detected"
# dnf install -y -q tar bzip2 gzip zip unzip p7zip p7zip-plugins 1> /dev/null
# elif
# then
# echo -e "Yum system detected"
# yum install -y -q tar bzip2 gzip zip unzip p7zip p7zip-plugins 1> /dev/null