From 1abf3efd74726b219b2515c0a13ea2dc5343d5c6 Mon Sep 17 00:00:00 2001 From: kprkpr Date: Mon, 30 May 2016 12:33:28 +0200 Subject: [PATCH] changes --- archinstall/chrootinstall.sh | 168 +++++++++++++++++++++++------------ 1 file changed, 109 insertions(+), 59 deletions(-) diff --git a/archinstall/chrootinstall.sh b/archinstall/chrootinstall.sh index 1cf6bd8..646965f 100755 --- a/archinstall/chrootinstall.sh +++ b/archinstall/chrootinstall.sh @@ -2,6 +2,12 @@ #Este script corre en el chroot para configurar todo argpart=$1 partefi=$2 + +function pause { +echo "Pulse enter para continuar..." +read +} + function horaidioma { #Idioma echo "Escoja su idioma. Se irá desde la abreviatura general, a la particular" @@ -49,72 +55,116 @@ passwd $nameuser } function graficos { -echo "¿Cual es la marca de su tarjeta gráfica?" -options=("Nvidia" "AMD/ATI" "Intel" "VIA" "No lo se") -select opt in "${options[@]}" -do - case $opt in - "Nvidia") - pacman -S xf86-video-nouveau xf86-video-nv --noconfirm - break - ;; - "AMD/ATI") - pacman -S xf86-video-ati --noconfirm - break - ;; - "Intel") - pacman -S xf86-video-intel --noconfirm - break - ;; - "VIA") - pacman -S xf86-video-openchrome --noconfirm - break - ;; - "No lo se") - pacman -S xf86-video-vesa xf86-video-nouveau xf86-video-nv xf86-video-ati xf86-video-intel xf86-video-openchrome --noconfirm - break - ;; - *) echo invalid option;; - esac -done +optgrafica=`dialog --stdout --nocancel --menu "¿Cual es la marca de su tarjeta gráfica?" 0 0 5 1 "Nvidia" 2 "AMD/ATI" 3 "Intel" 4 "VIA" 5 "No lo se/Instalar todas (Ocupa poco)"` + +case $optgrafica in + 1) + pacman -S xf86-video-nouveau xf86-video-nv --noconfirm + break + ;; + 2) + pacman -S xf86-video-ati --noconfirm + break + ;; + 3) + pacman -S xf86-video-intel --noconfirm + break + ;; + 4) + pacman -S xf86-video-openchrome --noconfirm + break + ;; + 5) + pacman -S xf86-video-vesa xf86-video-nouveau xf86-video-nv xf86-video-ati xf86-video-intel xf86-video-openchrome --noconfirm + break + ;; +esac + +} + +function programasuser { +echo "Ahora customizaremos e instalaremos programas que desee. Puede seleccionar 'cancelar' en cualquier apartado para no instalar ninguno" +echo "Se seleccionan o des seleccionan con la tecla espacio, y con el enter se acepta la selección" +pause +opta=`dialog --stdout --checklist "¿Que navegador quieres?" 10 40 5 1 "Firefox" on 2 "Chrome" off 3 "Chromium" off 4 "Opera" off 5 "Otter Browser" off` + +case $opta in + 1) + pacman -S firefox --noconfirm + ;; + 2) + pacman -S google-chrome --noconfirm + ;; + 3) + pacman -S chromium --noconfirm + ;; + 4) + pacman -S opera --noconfirm + ;; + 5) + pacman -S otter-browser --noconfirm + ;; +esac + +optb=`dialog --stdout --checklist "¿Editores de texto y/o office?" 10 40 5 1 "Libreoffice" on 2 "AbiWord" off 3 "Gnumeric" off 4 "WPS Office" off 5 "leafpad (Bloc de notas)" on 6 "gedit" off 7 "notepadqq" off` + +case $optb in + 1) + pacman -S libreoffice-fresh --noconfirm + ;; + 2) + pacman -S abiword --noconfirm + ;; + 3) + pacman -S gnumeric --noconfirm + ;; + 4) + pacman -S wps-office --noconfirm + ;; + 5) + pacman -S leafpad --noconfirm + ;; + 6) + pacman -S gedit --noconfirm + ;; + 7) + pacman -S notepadqq --noconfirm + ;; +esac } function entorno { clear #optentorno=`dialog --stdout --checklist "Choose your favorite distribution:" 10 40 3 1 RedHat on 2 "Ubuntu Linux" off 3 Slackware off` -optentorno=`dialog --stdout --menu "Escoje tu entorno de escritorio" 0 0 5 1 "LXDE (Liviano)" 2 "XFCE (Liviano pero bonito)" 3 "Cinnamon (Facil para antiguos usuarios de Windows)" 4 "Gnome (Complejo, pero práctico)" 5 "No instalar nada, solo la terminal de comandos"` +optentorno=`dialog --stdout --nocancel --menu "Escoje tu entorno de escritorio" 0 0 5 1 "LXDE (Liviano)" 2 "XFCE (Liviano pero bonito)" 3 "Cinnamon (Facil para antiguos usuarios de Windows)" 4 "Gnome (Complejo, pero práctico)" 5 "No instalar nada, solo la terminal de comandos"` + +case $optentorno in + 1) + pacman -S lxde --noconfirm + instentorno=1 + break + ;; + 2) + pacman -S xfce4 --noconfirm + instentorno=1 + break + ;; + 3) + pacman -S cinnamon --noconfirm + instentorno=1 + break + ;; + 4) + pacman -S gnome --noconfirm + instentorno=1 + break + ;; + 5) + break + ;; +esac -#options=("LXDE" "XFCE" "Cinnamon" "Gnome" "Solo quiero la consola") -select opt in "${options[@]}" -do - case $opt in - 1) - pacman -S lxde --noconfirm - instentorno=1 - break - ;; - 2) - pacman -S xfce4 --noconfirm - instentorno=1 - break - ;; - 3) - pacman -S cinnamon --noconfirm - instentorno=1 - break - ;; - 4) - pacman -S gnome --noconfirm - instentorno=1 - break - ;; - 5) - break - ;; - *) echo invalid option;; - esac -done if [[ $instentorno ]];then graficos