1
0
mirror of https://gitlab.com/JKANetwork/JKArch.git synced 2026-02-15 09:41:31 +01:00
This commit is contained in:
2017-01-21 16:42:32 +01:00
parent 383dd54bdf
commit 14902804de

View File

@@ -400,6 +400,7 @@ function programasguiuser {
opt3="1" opt3="1"
opt5="1 2" opt5="1 2"
opt6="1 2 3 4 5 6" opt6="1 2 3 4 5 6"
opt7="1 2 5"
mostrardialog "Leer" "Ahora se le presenta la opcion de elegir que programas quieres que sean instalados, cosa que recomendamos, aunque, dejamos tambien una opcion rapida, que instalara lo basico y recomendado desde nuestro punto de vista." mostrardialog "Leer" "Ahora se le presenta la opcion de elegir que programas quieres que sean instalados, cosa que recomendamos, aunque, dejamos tambien una opcion rapida, que instalara lo basico y recomendado desde nuestro punto de vista."
tipoinstall=`dialog --stdout --nocancel --menu "¿Elegir los programas que quiere?" 0 0 5 1 "Si, elegir (Muy recomendado)" 2 "No, instalar preseleccion de programas (Opcion rapida)" 3 "No, no instalar ninguno (Solo tendras el entorno y poco más)"` tipoinstall=`dialog --stdout --nocancel --menu "¿Elegir los programas que quiere?" 0 0 5 1 "Si, elegir (Muy recomendado)" 2 "No, instalar preseleccion de programas (Opcion rapida)" 3 "No, no instalar ninguno (Solo tendras el entorno y poco más)"`
case $tipoinstall in case $tipoinstall in
@@ -416,7 +417,7 @@ function programasguiuser {
4) opt4=`dialog --stdout --checklist "Imagen" 0 0 6 1 "GIMP" $(optstate "$opt4" 1) 2 "Inkscape" $(optstate "$opt4" 2) 3 "Pinta" $(optstate "$opt4" 3) 4 "Krita (Dibujo)" $(optstate "$opt4" 4)`;; 4) opt4=`dialog --stdout --checklist "Imagen" 0 0 6 1 "GIMP" $(optstate "$opt4" 1) 2 "Inkscape" $(optstate "$opt4" 2) 3 "Pinta" $(optstate "$opt4" 3) 4 "Krita (Dibujo)" $(optstate "$opt4" 4)`;;
5) opt5=`dialog --stdout --checklist "Fuentes/Tipos de letra" 0 0 6 1 "Fuentes basicas (Noto,devaju,liberation..)" $(optstate "$opt5" 1) 2 "Microsoft Fonts" $(optstate "$opt5" 2) 3 "Recopilatorio de fuentes de Google (mas de 300)" $(optstate "$opt5" 3)`;; 5) opt5=`dialog --stdout --checklist "Fuentes/Tipos de letra" 0 0 6 1 "Fuentes basicas (Noto,devaju,liberation..)" $(optstate "$opt5" 1) 2 "Microsoft Fonts" $(optstate "$opt5" 2) 3 "Recopilatorio de fuentes de Google (mas de 300)" $(optstate "$opt5" 3)`;;
6) opt6=`dialog --stdout --checklist "Recomendado pulsar todos \nUtilidades basicas" 0 0 6 1 "Evince (Lector PDF)" $(optstate "$opt6" 1) 2 "Ristretto (imagenes jpg,png...)" $(optstate "$opt6" 2) 3 "Cacluladora" $(optstate "$opt6" 3) 4 "Montar ISO/IMG" $(optstate "$opt6" 4) 5 "(Des)compresor de archivos (ZIP,RAR...)" $(optstate "$opt6" 5) 6 "Miniaturas mejoradas de ficheros" $(optstate "$opt6" 6)`;; 6) opt6=`dialog --stdout --checklist "Recomendado pulsar todos \nUtilidades basicas" 0 0 6 1 "Evince (Lector PDF)" $(optstate "$opt6" 1) 2 "Ristretto (imagenes jpg,png...)" $(optstate "$opt6" 2) 3 "Cacluladora" $(optstate "$opt6" 3) 4 "Montar ISO/IMG" $(optstate "$opt6" 4) 5 "(Des)compresor de archivos (ZIP,RAR...)" $(optstate "$opt6" 5) 6 "Miniaturas mejoradas de ficheros" $(optstate "$opt6" 6)`;;
7) opt7=`dialog --stdout --checklist "Soportes (Impresoras,Bluetooth...)" 0 0 6 1 "CUPS (Soporte impresoras)" $(optstate "$opt7" 1) 2 "HPLIP (Soporte impresoras HP)" $(optstate "$opt7" 2) 3 "Bluetooth" $(optstate "$opt7" 3)`;; 7) opt7=`dialog --stdout --checklist "Soportes (Impresoras,Bluetooth...)" 0 0 6 1 "CUPS (Soporte impresoras)" $(optstate "$opt7" 1) 2 "Drivers comunes impresoras" $(optstate "$opt7" 2) 3 "HPLIP (Soporte impresoras HP)" $(optstate "$opt7" 3) 4 "Bluetooth" $(optstate "$opt7" 4) 5 "Escaner (Programa)" $(optstate "$opt7" 5)`;;
8) opt8=`dialog --stdout --scrollbar --checklist "Utilidades varias" 0 0 8 1 "Dropbox" $(optstate "$opt8" 1) 2 "MEGA" $(optstate "$opt8" 2) 3 "Visor de correo Evolution" $(optstate "$opt8" 3) 4 "Grabador de discos (k3b)" $(optstate "$opt8" 4) 5 "Java (jre8)" $(optstate "$opt8" 5) 6 "Wine ('Emulador' de programas de Windows)" $(optstate "$opt8" 6) 7 "BleachBit (Limpiador de disco duro)" $(optstate "$opt8" 7)`;; 8) opt8=`dialog --stdout --scrollbar --checklist "Utilidades varias" 0 0 8 1 "Dropbox" $(optstate "$opt8" 1) 2 "MEGA" $(optstate "$opt8" 2) 3 "Visor de correo Evolution" $(optstate "$opt8" 3) 4 "Grabador de discos (k3b)" $(optstate "$opt8" 4) 5 "Java (jre8)" $(optstate "$opt8" 5) 6 "Wine ('Emulador' de programas de Windows)" $(optstate "$opt8" 6) 7 "BleachBit (Limpiador de disco duro)" $(optstate "$opt8" 7)`;;
9) opt9=`dialog --stdout --scrollbar --checklist "Programacion (IDEs)" 0 0 8 1 "Sublime Text 3" $(optstate "$opt9" 1) 2 "Sublime Text 2" $(optstate "$opt9" 2) 3 "Visual Studio Code" $(optstate "$opt9" 3) 4 "Eclipse" $(optstate "$opt9" 4) 5 "Monodevelop" $(optstate "$opt9" 5) 6 "Brackets" $(optstate "$opt9" 6) 7 "Atom" $(optstate "$opt9" 7) 8 "Gamedevelop" $(optstate "$opt9" 8) 9 "Poedit (gettext)" $(optstate "$opt9" 9) A "Arduino IDE" $(optstate "$opt9" A)`;; 9) opt9=`dialog --stdout --scrollbar --checklist "Programacion (IDEs)" 0 0 8 1 "Sublime Text 3" $(optstate "$opt9" 1) 2 "Sublime Text 2" $(optstate "$opt9" 2) 3 "Visual Studio Code" $(optstate "$opt9" 3) 4 "Eclipse" $(optstate "$opt9" 4) 5 "Monodevelop" $(optstate "$opt9" 5) 6 "Brackets" $(optstate "$opt9" 6) 7 "Atom" $(optstate "$opt9" 7) 8 "Gamedevelop" $(optstate "$opt9" 8) 9 "Poedit (gettext)" $(optstate "$opt9" 9) A "Arduino IDE" $(optstate "$opt9" A)`;;
"A") optA=`dialog --stdout --checklist "Programacion (Programas)" 0 0 6 1 "base-devel (standard utils like GCC)" $(optstate "$optA" 1) 2 "Java (OpenJDK 8)" $(optstate "$optA" 2)`;; "A") optA=`dialog --stdout --checklist "Programacion (Programas)" 0 0 6 1 "base-devel (standard utils like GCC)" $(optstate "$optA" 1) 2 "Java (OpenJDK 8)" $(optstate "$optA" 2)`;;
@@ -479,9 +480,17 @@ function programasguiuser {
*6*) packages="$packages tumbler poppler-glib ffmpegthumbnailer libgsf";;& *6*) packages="$packages tumbler poppler-glib ffmpegthumbnailer libgsf";;&
esac esac
case $opt7 in case $opt7 in
*1*) packages="$packages cups cups-filters";;& *1*) cups=1;;&
*2*) packages="$packages hplip";;& *2*) packages="$packages foomatic-db-engine foomatic-db foomatic-db-ppds"
*3*) packages="$packages bluez bluez-utils bluez-cups bluez-firmware bluez-libs blueberry";;& cups=1
;;&
*3*) packages="$packages hplip"
cups=1
;;&
*4*) packages="$packages bluez bluez-utils bluez-cups bluez-firmware bluez-libs blueberry";;&
*5*) packages="$packages xsane"
cups=1
;;&
esac esac
case $opt8 in case $opt8 in
*1*) packages="$packages dropbox";;& *1*) packages="$packages dropbox";;&
@@ -512,6 +521,10 @@ function programasguiuser {
esac esac
allpackages=$allpackages" "$packages allpackages=$allpackages" "$packages
packages="" packages=""
#Añadir soporte cups basico si se selecciona cualquier opcion de impresoras
if [[ $cups = "1" ]];then
allpackages=$allpackages" cups cups-filters cups-pk-helper system-config-printer gtk3-print-backends"
fi
fi fi
} }
@@ -552,7 +565,7 @@ function entorno {
# Basic programs (Xorg) and audio support if there is selected any # Basic programs (Xorg) and audio support if there is selected any
if [[ $optentorno != 7 ]];then if [[ $optentorno != 7 ]];then
#Gestor de energia xfce4-power-manager #Gestor de energia xfce4-power-manager
allpackages=$allpackages" xorg-server xorg-xinit xorg-server-common xf86-input-libinput xterm lightdm lightdm-gtk-greeter gvfs gvfs-mtp gvfs-smb gvfs-afc udisks networkmanager network-manager-applet gnome-keyring xdialog lxterminal ttf-inconsolata octopi octopi-notifier gksu pulseaudio pavucontrol xdg-user-dirs jkarch-appearance xfce4-power-manager" allpackages=$allpackages" xorg-server xorg-xinit xorg-server-common xf86-input-libinput xterm lightdm lightdm-gtk-greeter gvfs gvfs-mtp gvfs-smb gvfs-afc udisks networkmanager network-manager-applet gnome-keyring xdialog lxterminal ttf-inconsolata octopi octopi-notifier gksu pulseaudio pavucontrol xdg-user-dirs jkarch-appearance xfce4-power-manager lxtask"
fi fi
} }
# End of functions that are user interactive for configuring system # End of functions that are user interactive for configuring system
@@ -657,9 +670,8 @@ function installconf {
execl chroot hwclock --systohc --utc execl chroot hwclock --systohc --utc
execl chroot systemctl enable ntpd execl chroot systemctl enable ntpd
if [[ $isoffline = 0 ]];then #Only sync if its online if [[ $isoffline = 0 ]];then #Only sync if its online
echo "$(T "Syncing hour to internet")"; echo "$(T "Syncing hour to internet in background")";
execl chroot ntpd -qg execl chroot (ntpd -qg && && hwclock -w) &> /dev/null
execl chroot hwclock -w
else else
echo "Clock will not be okay until restart and configure manually because you dont have net" echo "Clock will not be okay until restart and configure manually because you dont have net"
fi fi
@@ -693,6 +705,14 @@ function installconf {
execl chroot pacman -R gdm --noconfirm execl chroot pacman -R gdm --noconfirm
fi fi
if [[ $optentorno = 5 ]];then #MATE
if [[ $isoffline = "1" ]];then # Is an offline installation?
tar xJf mods/MATE.tar.xz -C /mnt/
else #online
wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/mods/MATE.tar.xz -O- | tar xJf - -C /mnt/
fi
fi
if [[ $optentorno = 6 ]];then #Plasma, remove 2 apps if [[ $optentorno = 6 ]];then #Plasma, remove 2 apps
execl chroot pacman -R plasma-mediacenter ksshaskpass --noconfirm execl chroot pacman -R plasma-mediacenter ksshaskpass --noconfirm
fi fi
@@ -718,6 +738,11 @@ function installconf {
execl chroot systemctl enable NetworkManager execl chroot systemctl enable NetworkManager
execl chroot systemctl enable dhcpcd execl chroot systemctl enable dhcpcd
# Enable cupsd service for printing
if [[ $cups = "1" ]];then
execl chroot systemctl enable org.cups.cupsd
fi
# Configure wine if neccesary # Configure wine if neccesary
if [[ $inswine = "1" ]];then if [[ $inswine = "1" ]];then
@@ -777,6 +802,7 @@ function installconf {
# Clean pacman # Clean pacman
echo "$(T "Cleaning")" echo "$(T "Cleaning")"
execl chroot rm -rf $sfslocate/var/cache/pacman/pkg/*
execl chroot pacman -Sc --noconfirm execl chroot pacman -Sc --noconfirm
} # Fin installconf } # Fin installconf