#!/usr/bin/env bash # Function function get_dep(){ # Busca la manera de capturar el error. Y mostrar mensaje en rojo. apt-get install -y $@ 1> /dev/null if [[ $@ == "p7zip-full" ]]; then complete_install 7z; else 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-full else for i in $@ do if [ $i -ne "-i" ] then case $i in "rar" | "unrar") rarInstall ;; "7z" | "7zip" | "p7zip") get_dep p7zip-full ;; *) get_dep $i ;; esac fi done fi