Browse Source

0.6r0

pull/3/head
Gustavo Adolfo Mesa Roldán 3 years ago
parent
commit
c394876fcb
3 changed files with 39 additions and 23 deletions
  1. +6
    -6
      lib/installer.sh
  2. +29
    -17
      lib/installers/apt.sh
  3. +4
    -0
      lib/resources.sh

+ 6
- 6
lib/installer.sh View File

@ -11,13 +11,13 @@ function rarInstall(){
RAR_URL="https://www.rarlab.com/rar/rarlinux-5.9.1.tar.gz"
RAR_FILE="rarlinux-5.9.1.tar.gz"
fi
wget $RAR_URL
tar -zxvf $RAR_FILE
wget -q $RAR_URL > /dev/null
tar -zxvf $RAR_FILE > /dev/null
cd rar
cp -v rar unrar /usr/local/bin/
cp -v rar unrar /usr/local/bin/ > /dev/null
cd ..
rm -r rar $RAR_FILE
echo "rar/unrar installed."
rm -r rar $RAR_FILE > /dev/null
complete_install "rar"
else
echo -e "\n\e[91m[Error]\e[0m - wget is not installed, so rar could not be installed.\nPlease install wget.\n"
read -p "Press [ENTER] to continue installing or [CTRL+C] to exit."
@ -79,5 +79,5 @@ function install()
echo -e "System installer not detected"
fi
echo -e "Dependencies installation finished\n"
echo -e "\nDependencies installation finished\n"
}

+ 29
- 17
lib/installers/apt.sh View File

@ -2,34 +2,46 @@
# Function
function install(){
echo "$@:"
function get_dep(){
# Busca la manera de capturar el error. Y mostrar mensaje en rojo.
apt-get install -y $@ 1> /dev/null
echo "e[32mInstalled\e[0m"
complete_install $@
}
# Run
echo -e "APT system detected"
echo $@
echo $1
echo $0
echo $PRIVSOFT
echo "----------"
echo "---------------------"
install $2
if [ $# -eq 1 ]; then
install tar
install bzip2
install gzip
install zip
install unzip
install p7zip-full p7zip-rar
if $PRIVSOFT; then
rarInstall
fi
get_dep tar
get_dep bzip2
get_dep gzip
get_dep zip
get_dep unzip
get_dep p7zip-full
else
#Tropa
for i in $@
do
if [ $i != "-i" ]
then
case $i in
"rar" | "unrar")
rarInstall
;;
"7z" | "7zip" | "p7zip")
get_dep p7zip-full
;;
*)
get_dep $i
;;
esac
fi
done
fi
# apt-get install -y tar bzip2 gzip zip unzip p7zip-full p7zip-rar 1> /dev/null

+ 4
- 0
lib/resources.sh View File

@ -70,4 +70,8 @@ function executer()
else
error_not_install $1
fi
}
complete_install(){
echo -e "$@:\t\t\t\e[32mComplete\e[0m"
}

Loading…
Cancel
Save