1
0
mirror of https://gitlab.com/JKANetwork/JKArch.git synced 2026-02-18 03:01:32 +01:00
This commit is contained in:
kprkpr
2016-06-04 00:06:19 +02:00
parent 4004a776db
commit 017a77dc27
4 changed files with 54 additions and 18 deletions

View File

@@ -1,37 +1,29 @@
#!/bin/bash
echo "Bienvenido a JKArch"
idiom=`dialog --stdout --nocancel --backtitle "JKArch Instalation" --title "Language selection" --menu "Select your language" 0 70 5 1 "Spanish (es)" 2 "English (en)"`
if [[ $idiom -eq 1 ]];then
loadkeys es
LANG="es_ES.UTF-8" ; export LANG
elif [[ $idiom -eq 2 ]];then
loadkeys en
LANG="en_GB.UTF-8" ; export LANG
fi
opt=`dialog --stdout --nocancel --backtitle "Instalacion de JKArch" --title "Bienvenido a JKArch" --menu "Para poder comenzar la instalacion, se necesita una conexion a internet. ¿Como te conectas?" 0 70 5 1 "Estoy por cable (Ethernet)" 2 "Wi-Fi/Inalambrico" 3 "Configuracion compleja (Ir a la terminal)"`
opt=`dialog --stdout --nocancel --backtitle "Instalacion de JKArch / JKArch installation" --title "Bienvenido a JKArch / Welcome" --menu "Para poder comenzar la instalacion, se necesita una conexion a internet. / We need an internet conection to start" 0 70 5 1 "Estoy por cable (Ethernet) /I'm using cable" 2 "Wi-Fi" 3 "Configuracion compleja (Ir a la terminal) / Other (Terminal)"`
if [[ $opt -eq 2 ]];then
wifi-menu
elif [[ $opt -eq 3 ]];then
clear
echo "Te sacamos a la terminal, configure internet, asegurese de que funcione y después escriba exit para continuar"
echo "You will go to the bash terminal, you can configure network, and then write exit"
bash
fi
clear
echo "Vamos a comprobar que tienes conexión a internet"
echo "Testing network conection"
ping 8.8.8.8 -c3
if [[ $? != 0 ]];then
clear
dialog --title "Conexión" --msgbox "Error en la conexión \nse reiniciará la instalación \nPulse enter para continuar" 15 60
dialog --title "Conexión / Network " --msgbox "Error en la conexión \nse reiniciará la instalación \n\n Network error. Restarting the install.." 15 60
exec ./downloadinstall.sh
fi
wget https://gitlab.com/JKANetwork/JKArch/raw/master/archinstall/archinstall.sh -O archinstall.sh
if [ $(cat archinstall | grep "^<\!DOCTYPE html>") == "<\!DOCTYPE html>" ];then
wget https://gitlab.com/JKANetwork/JKArch/raw/master/archinstall/selectlang.sh -O selectlang.sh
if [ $(cat selectlang.sh | grep "^<\!DOCTYPE html>") == "<\!DOCTYPE html>" ];then
clear
dialog --title "Descarga incorrecta" --msgbox "La descarga del instalador ha fallado \nse reiniciará la instalación \nPulse enter para continuar" 15 60
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 ./downloadinstall.sh
fi
chmod +x archinstall.sh
./archinstall.sh
chmod +x selectlang.sh
exec ./selectlang.sh