0.6r0
This commit is contained in:
+6
-6
@@ -11,13 +11,13 @@ function rarInstall(){
|
|||||||
RAR_URL="https://www.rarlab.com/rar/rarlinux-5.9.1.tar.gz"
|
RAR_URL="https://www.rarlab.com/rar/rarlinux-5.9.1.tar.gz"
|
||||||
RAR_FILE="rarlinux-5.9.1.tar.gz"
|
RAR_FILE="rarlinux-5.9.1.tar.gz"
|
||||||
fi
|
fi
|
||||||
wget $RAR_URL
|
wget -q $RAR_URL > /dev/null
|
||||||
tar -zxvf $RAR_FILE
|
tar -zxvf $RAR_FILE > /dev/null
|
||||||
cd rar
|
cd rar
|
||||||
cp -v rar unrar /usr/local/bin/
|
cp -v rar unrar /usr/local/bin/ > /dev/null
|
||||||
cd ..
|
cd ..
|
||||||
rm -r rar $RAR_FILE
|
rm -r rar $RAR_FILE > /dev/null
|
||||||
echo "rar/unrar installed."
|
complete_install "rar"
|
||||||
else
|
else
|
||||||
echo -e "\n\e[91m[Error]\e[0m - wget is not installed, so rar could not be installed.\nPlease install wget.\n"
|
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."
|
read -p "Press [ENTER] to continue installing or [CTRL+C] to exit."
|
||||||
@@ -79,5 +79,5 @@ function install()
|
|||||||
echo -e "System installer not detected"
|
echo -e "System installer not detected"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "Dependencies installation finished\n"
|
echo -e "\nDependencies installation finished\n"
|
||||||
}
|
}
|
||||||
+29
-17
@@ -2,34 +2,46 @@
|
|||||||
|
|
||||||
# Function
|
# Function
|
||||||
|
|
||||||
function install(){
|
function get_dep(){
|
||||||
echo "$@:"
|
|
||||||
# Busca la manera de capturar el error. Y mostrar mensaje en rojo.
|
# Busca la manera de capturar el error. Y mostrar mensaje en rojo.
|
||||||
apt-get install -y $@ 1> /dev/null
|
apt-get install -y $@ 1> /dev/null
|
||||||
echo "e[32mInstalled\e[0m"
|
complete_install $@
|
||||||
}
|
}
|
||||||
|
|
||||||
# Run
|
# Run
|
||||||
|
|
||||||
echo -e "APT system detected"
|
echo -e "APT system detected"
|
||||||
echo $@
|
echo "---------------------"
|
||||||
echo $1
|
|
||||||
echo $0
|
|
||||||
echo $PRIVSOFT
|
|
||||||
echo "----------"
|
|
||||||
|
|
||||||
install $2
|
|
||||||
|
|
||||||
if [ $# -eq 1 ]; then
|
if [ $# -eq 1 ]; then
|
||||||
install tar
|
if $PRIVSOFT; then
|
||||||
install bzip2
|
rarInstall
|
||||||
install gzip
|
fi
|
||||||
install zip
|
get_dep tar
|
||||||
install unzip
|
get_dep bzip2
|
||||||
install p7zip-full p7zip-rar
|
get_dep gzip
|
||||||
|
get_dep zip
|
||||||
|
get_dep unzip
|
||||||
|
get_dep p7zip-full
|
||||||
else
|
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
|
fi
|
||||||
|
|
||||||
# apt-get install -y tar bzip2 gzip zip unzip p7zip-full p7zip-rar 1> /dev/null
|
# apt-get install -y tar bzip2 gzip zip unzip p7zip-full p7zip-rar 1> /dev/null
|
||||||
@@ -70,4 +70,8 @@ function executer()
|
|||||||
else
|
else
|
||||||
error_not_install $1
|
error_not_install $1
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
complete_install(){
|
||||||
|
echo -e "$@:\t\t\t\e[32mComplete\e[0m"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user