mirror of
https://gitlab.com/JKANetwork/JKArch.git
synced 2026-02-15 09:41:31 +01:00
Updated installer and scripts
This commit is contained in:
@@ -45,8 +45,8 @@ function showdo {
|
||||
|
||||
function yesnobox {
|
||||
local title=$1
|
||||
#Return Y or N
|
||||
echo `dialog --stdout --nocancel --menu "$title" 0 0 4 Y "$(T "Yes")" N "No"`
|
||||
#Exit code is 0 for Yes, and 1 for no
|
||||
dialog --nocancel --yes-label "$(T "Yes")" --yesno "$title" 0 0
|
||||
}
|
||||
|
||||
function fatalerror {
|
||||
@@ -322,7 +322,7 @@ function particiones {
|
||||
|
||||
## Date and language
|
||||
function horaidioma {
|
||||
while [[ $confirm != "Y" ]];do
|
||||
while [[ $confirm != "0" ]];do
|
||||
varx="" #Empty var
|
||||
langs=$(cat /etc/locale.gen | grep '^#[a-zA-Z]' | cut -f1 -d" " | cut -c2-30 | sort | uniq)
|
||||
for addr in $(echo $langs | tr " " "\n")
|
||||
@@ -337,14 +337,16 @@ function horaidioma {
|
||||
langinst=$(cat /etc/locale.gen | grep -m1 '^#'$opclang | cut -c2-40)
|
||||
|
||||
#Confirm
|
||||
confirm=`yesnobox "$(T "Your language:") $opclang. Correcto?"`
|
||||
yesnobox "$(T "Your language:") $opclang. Correcto?"
|
||||
confirm=$? # 0->Yes
|
||||
done #End of selecting lang
|
||||
confirm="" #Erase var
|
||||
|
||||
echo "$(T "Now select your timezone for adjusting the clock")"
|
||||
while [[ $confirm != "Y" ]];do
|
||||
NEW_TIMEZONE=$(execl tzselect)
|
||||
confirm=`yesnobox "$(T "Your timezone is") $NEW_TIMEZONE ?"`
|
||||
while [[ $confirm != "0" ]];do # 0->Yes
|
||||
NEW_TIMEZONE=$(execl tzselect)
|
||||
yesnobox "$(T "Your timezone is") $NEW_TIMEZONE ?"
|
||||
confirm=$? # 0->Yes
|
||||
done
|
||||
confirm="" #Erase var
|
||||
}
|
||||
@@ -395,12 +397,12 @@ function appsuser {
|
||||
3) packages="$packages opera";;
|
||||
esac
|
||||
|
||||
confirm=`yesnobox "Habilitar soporte bluetooth?"`
|
||||
if [[ $confirm == "Y" ]];then
|
||||
yesnobox "Habilitar soporte bluetooth?"
|
||||
if [[ $? == "0" ]];then
|
||||
packages="$packages bluez bluez-utils bluez-cups bluez-firmware bluez-libs blueberry "
|
||||
fi
|
||||
confirm=`yesnobox "Habilitar compatibilidad programas Windows (Usando wine)?"`
|
||||
if [[ $confirm == "Y" ]];then
|
||||
yesnobox "Habilitar compatibilidad programas Windows (Usando wine)?"
|
||||
if [[ $? == "0" ]];then
|
||||
packages="$packages wine-staging wine_gecko winetricks"
|
||||
packages="$packages lib32-libpng lib32-libldap lib32-gnutls lib32-mpg123 lib32-libpulse lib32-ncurses lib32-openal lib32-alsa-lib lib32-gst-plugins-base-libs gnome-exe-thumbnailer samba" #Some 32bit libs for winearch 32 work better, and thumbs for .exe (samba needed too)
|
||||
inswine=1
|
||||
@@ -550,8 +552,8 @@ function installconf {
|
||||
# Linux kernel
|
||||
execl chroot mkinitcpio -p linux #Hacemos el mkinitcpio después de tener instalados los gráficos
|
||||
|
||||
confirm=`yesnobox "¿Instalar gestor de arranque? (Pulsar SI a no ser que sepas lo que haces)"`
|
||||
if [[ $confirm == "Y" ]];then
|
||||
yesnobox "¿Instalar gestor de arranque? (Pulsar SI a no ser que sepas lo que haces)"
|
||||
if [[ $? == "0" ]];then
|
||||
# Install and configure bootloader GRUB/rEFInd
|
||||
if [[ -z $partefi ]];then #If it dont have EFI
|
||||
execl chroot pacman -S grub os-prober --noconfirm
|
||||
@@ -729,14 +731,8 @@ userpass
|
||||
|
||||
clear
|
||||
# Resumen de los cambios
|
||||
tput setaf 6
|
||||
echo "$(T "Ok, last thing before start installing, summary of changes")"
|
||||
echo "$(T "Partition scheme before your changes")"
|
||||
tput setaf 9
|
||||
lsblk --output NAME,KNAME,FSTYPE,SIZE,LABEL
|
||||
tput setaf 6
|
||||
echo "$(T "Your changes")"
|
||||
tput setaf 9
|
||||
|
||||
# Vars before the dialog
|
||||
case $formatoraiz in
|
||||
"mkfs.ext4 -F")
|
||||
mosfraiz="$(T "ext4 formatted")";;
|
||||
@@ -747,8 +743,6 @@ case $formatoraiz in
|
||||
"echo No formatear ")
|
||||
mosfraiz="$(T "not formatted")";;
|
||||
esac
|
||||
echo "$(T "Root partition"): $particionraiz , $mosfraiz"
|
||||
if [[ $particionhome ]];then
|
||||
case $formatohome in
|
||||
"mkfs.ext4 -F")
|
||||
mosfhome="$(T "ext4 formatted")";;
|
||||
@@ -759,12 +753,6 @@ case $formatohome in
|
||||
"echo No formatear ")
|
||||
mosfhome="$(T "not formatted")";;
|
||||
esac
|
||||
echo "$(T "Home partition"): $particionhome , $mosfhome"
|
||||
fi
|
||||
if [[ $partefi ]];then
|
||||
echo "$(T "EFI partition in") $partefi"
|
||||
fi
|
||||
|
||||
# Log options
|
||||
echo "------" >> "/tmp/install.log"
|
||||
echo "Install partition options" >> "/tmp/install.log"
|
||||
@@ -782,25 +770,21 @@ if [[ $particionhome ]];then
|
||||
fi
|
||||
#
|
||||
|
||||
# Make the question
|
||||
dialog --nocancel --stdout --yes-label "Si, instalar" --no-label "No, volver a empezar" --yesno "$(T "Ok, last thing before start installing, summary of changes")\n \
|
||||
$(T "Partition scheme before your changes") \n \
|
||||
$(lsblk --output NAME,KNAME,FSTYPE,SIZE,LABEL) \n \
|
||||
$(T "Your changes") \n \
|
||||
$(T "Root partition"): $particionraiz , $mosfraiz \n \
|
||||
$(T "Home partition"): $particionhome , $mosfhome \n \
|
||||
$(if [[ $partefi ]];then echo $(T "EFI partition in") $partefi;fi) \n \
|
||||
¿Estas de acuerdo con los cambios y quieres comenzar la instalacion?"
|
||||
|
||||
#Pregunta si instalar o no
|
||||
tput setaf 1
|
||||
echo "¿Estas de acuerdo con los cambios y quieres comenzar la instalacion?"
|
||||
options=("No, volver a empezar" "Si, instalar" "No, apagar el ordenador")
|
||||
select opt in "${options[@]}"
|
||||
do
|
||||
case $opt in
|
||||
"No, volver a empezar")
|
||||
if [[ $? == "1" ]];then #If say no, reset install
|
||||
rm /tmp/install.log
|
||||
exec ./selectlang.sh
|
||||
break;;
|
||||
"Si, instalar") break;;
|
||||
"No, apagar el ordenador")
|
||||
poweroff
|
||||
exit
|
||||
;;
|
||||
esac
|
||||
done
|
||||
exec ./installer.sh
|
||||
exit
|
||||
fi
|
||||
tput setaf 9
|
||||
|
||||
# Real install
|
||||
|
||||
Reference in New Issue
Block a user