mirror of
https://gitlab.com/JKANetwork/JKArch.git
synced 2026-02-28 16:03:43 +01:00
rewrite
This commit is contained in:
32
oldarchinstall/selectlang.sh
Executable file
32
oldarchinstall/selectlang.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
##This script only selects the installer language and, if its a online install, asks user to use stable or devel installer
|
||||
idiom=`dialog --stdout --nocancel --backtitle "JKArch Instalation" --title "Language selection" --menu "Select your language / Selecciona tu idioma" 0 70 5 1 "Spanish (es)" 2 "English (en) (In progress)"`
|
||||
|
||||
if [[ $idiom -eq 1 ]];then
|
||||
sclang="es"
|
||||
loadkeys es
|
||||
#LANG="es_ES.UTF-8" ; export LANG
|
||||
elif [[ $idiom -eq 2 ]];then
|
||||
sclang="en"
|
||||
loadkeys en
|
||||
#LANG="en_GB.UTF-8" ; export LANG
|
||||
fi
|
||||
|
||||
if [[ -f translations.sh ]];then #If its a offline install (ISO)
|
||||
exec ./archinstall.sh $sclang 1 #Offline
|
||||
else #Online install
|
||||
#Download and exec
|
||||
wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/archinstall/archinstall.sh -O archinstall.sh
|
||||
|
||||
wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/archinstall/translations.sh -O translations.sh
|
||||
|
||||
if [[ $(cat archinstall.sh | grep "^<\!DOCTYPE html>") == "<\!DOCTYPE html>" || $(cat translations.sh | grep "^<\!DOCTYPE html>") == "<\!DOCTYPE html>" ]];then
|
||||
clear
|
||||
dialog --title "Descarga incorrecta / Corrupted download" --msgbox "La descarga del instalador ha fallado \nse reiniciará la instalación \n\n Download failed. Restarting install.." 15 60
|
||||
exec ./selectlang.sh
|
||||
fi
|
||||
chmod +x archinstall.sh
|
||||
chmod +x translations.sh
|
||||
exec ./archinstall.sh $sclang 0 #Online
|
||||
|
||||
fi
|
||||
Reference in New Issue
Block a user