0.6r3
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
VERSION=0.6r2
|
||||
VERSION=0.6r3
|
||||
DEST=$1
|
||||
shift 1
|
||||
ORIG=$@
|
||||
|
||||
+11
-9
@@ -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
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user