Browse Source

0.6r3

pull/3/head
ale 3 years ago
parent
commit
2b48268c30
3 changed files with 16 additions and 10 deletions
  1. +1
    -1
      lch
  2. +11
    -9
      lib/installers/deb.sh
  3. +4
    -0
      lib/resources.sh

+ 1
- 1
lch View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
VERSION=0.6r2
VERSION=0.6r3
DEST=$1
shift 1
ORIG=$@


+ 11
- 9
lib/installers/deb.sh 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


+ 4
- 0
lib/resources.sh View File

@ -74,4 +74,8 @@ 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"
}

Loading…
Cancel
Save