Browse Source

0.6r4

pull/3/head
ale 3 years ago
parent
commit
1e1be717d7
3 changed files with 22 additions and 21 deletions
  1. +1
    -1
      lch
  2. +1
    -1
      lib/installers/deb.sh
  3. +20
    -19
      lib/installers/rpm.sh

+ 1
- 1
lch View File

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


+ 1
- 1
lib/installers/deb.sh View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
# Function
# Functions
function get_dep(){
apt-get install -y $@ &> /dev/null


+ 20
- 19
lib/installers/rpm.sh View File

@ -1,42 +1,43 @@
#!/usr/bin/env bash
# Function
# Functions
function get_dep(){
# Busca la manera de capturar el error. Y mostrar mensaje en rojo.
yum install -y -q $@ 1> /dev/null
if [[ $@ -ne "p7zip-plugins" ]]; then complete_install $@; fi
if [[ $@ -ne "p7zip-plugins" ]]; then
yum install -y -q $@ 1> /dev/null
else
yum install -y -q $@ 1> /dev/null
if [[ $? -ne 0 ]]; then
if [[ $@ == "p7zip" ]]; then failed_install 7z; else failed_install $@; fi
else
if [[ $@ == "p7zip" ]]; then complete_install 7z; else complete_install $@; fi
fi
fi
}
function install_centos(){
if [ -n "$(grep "centos" /etc/*-release)" ]; then
yum install -y -q epel-release 1> /dev/null
rpm -U --quiet http://mirrors.kernel.org/fedora-epel/6/i386/epel-release-6-8.noarch.rpm 1> /dev/null
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 1> /dev/null
yum repolist 1> /dev/null
if [ -n "$(grep "centos" /etc/*-release)" ]; then
yum install -y -q epel-release &> /dev/null
rpm --quiet --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8 &> /dev/null
rpm -U --quiet http://mirrors.kernel.org/fedora-epel/6/i386/epel-release-6-8.noarch.rpm &> /dev/null
fi
}
# Run
echo -e "APT system detected"
echo -e "YUM system detected"
echo "---------------------"
yum -y -q update &> /dev/null
if [ $# -eq 1 ]; then
install_centos
if $PRIVSOFT; then
rarInstall
fi
get_dep tar
get_dep bzip2
get_dep gzip
get_dep zip
get_dep unzip
get_dep p7zip
get_dep p7zip-plugins
for installer in "tar" "bzip2" "gzip" "zip" "unzip" "p7zip" "p7zip-plugins"
do get_dep $installer
done
else
for i in $@
do


Loading…
Cancel
Save