#!/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 complete_install $@ } # 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 != "-i" ] then case $i in "rar" | "unrar") rarInstall ;; "7z" | "7zip" | "p7zip") get_dep p7zip-full ;; *) get_dep $i ;; esac fi done fi # apt-get install -y tar bzip2 gzip zip unzip p7zip-full p7zip-rar 1> /dev/null