This commit is contained in:
Gustavo Adolfo Mesa Roldán
2020-10-03 11:42:11 +02:00
parent 832718e391
commit c394876fcb
3 changed files with 39 additions and 23 deletions
+29 -17
View File
@@ -2,34 +2,46 @@
# Function
function install(){
echo "$@:"
function get_dep(){
# Busca la manera de capturar el error. Y mostrar mensaje en rojo.
apt-get install -y $@ 1> /dev/null
echo "e[32mInstalled\e[0m"
complete_install $@
}
# Run
echo -e "APT system detected"
echo $@
echo $1
echo $0
echo $PRIVSOFT
echo "----------"
echo "---------------------"
install $2
if [ $# -eq 1 ]; then
install tar
install bzip2
install gzip
install zip
install unzip
install p7zip-full p7zip-rar
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
#Tropa
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