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
+1 -1
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
VERSION=0.6r2
VERSION=0.6r3
DEST=$1
shift 1
ORIG=$@
+10 -8
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
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
+4
View File
@@ -75,3 +75,7 @@ function executer()
function complete_install(){
echo -e "$@:\t\t\t\e[32mComplete\e[0m"
}
function failed_install(){
echo -e "$@:\t\t\t\e[91mFailed\e[0m"
}