Commit d92a05e0 authored by Carlos Remuzzi's avatar Carlos Remuzzi
Browse files

implementando reconocimiento de distro

parent 833151ee
......@@ -54,10 +54,42 @@ verificar_archlinux_deps() {
exit 1
}
sudo pacman -Syy
sudo pacman --needed -S git curl xorg-xdpyinfo gstreamer
}
verificar_deps() {
if [ -e /etc/os-release ]; then
source /etc/os-release
dist=$ID
code="${VERSION_CODENAME-$VERSION_ID}"
case "${dist}-${code}" in
arch-)
verificar_archlinux_deps
;;
ubuntu-16.04)
verificar_debian_deps
;;
ubuntu-14.04)
verificar_debian_deps
;;
debian-9)
verificar_debian_deps
;;
debian-8)
verificar_debian_deps
;;
*)
echo "ERROR: La distro \"$PRETTY_NAME\" no esta suportada" >&2
exit 1
;;
esac
else
echo "ERROR: Esta distro y/o version no esta suportada." >&2
exit 1
fi
}
configurar_ap(){
if nmcli con show $1 > /dev/null 2>&1 ;then
echo "la conexión $1 está ya instalada"
......@@ -95,8 +127,7 @@ main() {
# Habilitación de exit-on-error después de colores
set -e
# verificando solo para debian
verificar_debian_deps
verificar_deps
if [ ! -n "$LIBRECAST" ]; then
LIBRECAST=~/librecast
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment