0.6r3
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
VERSION=0.6r2
|
VERSION=0.6r3
|
||||||
DEST=$1
|
DEST=$1
|
||||||
shift 1
|
shift 1
|
||||||
ORIG=$@
|
ORIG=$@
|
||||||
|
|||||||
+11
-9
@@ -3,9 +3,12 @@
|
|||||||
# Function
|
# Function
|
||||||
|
|
||||||
function get_dep(){
|
function get_dep(){
|
||||||
# Busca la manera de capturar el error. Y mostrar mensaje en rojo.
|
apt-get install -y $@ &> /dev/null
|
||||||
apt-get install -y $@ 1> /dev/null
|
if [[ $? -ne 0 ]]; then
|
||||||
if [[ $@ == "p7zip-full" ]]; then complete_install 7z; else complete_install $@; fi
|
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
|
# Run
|
||||||
@@ -13,16 +16,15 @@ function get_dep(){
|
|||||||
echo -e "APT system detected"
|
echo -e "APT system detected"
|
||||||
echo "---------------------"
|
echo "---------------------"
|
||||||
|
|
||||||
|
apt-get update 1> /dev/null
|
||||||
|
|
||||||
if [ $# -eq 1 ]; then
|
if [ $# -eq 1 ]; then
|
||||||
if $PRIVSOFT; then
|
if $PRIVSOFT; then
|
||||||
rarInstall
|
rarInstall
|
||||||
fi
|
fi
|
||||||
get_dep tar
|
for installer in "tar" "bzip2" "gzip" "zip" "unzip" "p7zip-full"
|
||||||
get_dep bzip2
|
do get_dep $installer
|
||||||
get_dep gzip
|
done
|
||||||
get_dep zip
|
|
||||||
get_dep unzip
|
|
||||||
get_dep p7zip-full
|
|
||||||
else
|
else
|
||||||
for i in $@
|
for i in $@
|
||||||
do
|
do
|
||||||
|
|||||||
@@ -74,4 +74,8 @@ function executer()
|
|||||||
|
|
||||||
function complete_install(){
|
function complete_install(){
|
||||||
echo -e "$@:\t\t\t\e[32mComplete\e[0m"
|
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