This commit is contained in:
ale
2020-10-03 12:42:16 +02:00
parent 54194e3b89
commit 2b48268c30
3 changed files with 16 additions and 10 deletions
+11 -9
View File
@@ -3,9 +3,12 @@
# 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
apt-get install -y $@ &> /dev/null
if [[ $? -ne 0 ]]; then
if [[ $@ == "p7zip-full" ]]; then failed_install 7z; else failed_install $@; fi
else
if [[ $@ == "p7zip-full" ]]; then complete_install 7z; else complete_install $@; fi
fi
}
# Run
@@ -13,16 +16,15 @@ function get_dep(){
echo -e "APT system detected"
echo "---------------------"
apt-get update 1> /dev/null
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
for installer in "tar" "bzip2" "gzip" "zip" "unzip" "p7zip-full"
do get_dep $installer
done
else
for i in $@
do