forked from CodigoCristo/arcris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
arcris-install
137 lines (105 loc) · 3.88 KB
/
arcris-install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#!/bin/sh
: 'Copyright (C) 2019 Código Cristo'
#!/bin/bash
# wget is.gd/arcris && sh arcris
# https://is.gd/stats.php?url=arcris
clear
#Colores
red='\033[38;2;255;0;02m'
echo ""
echo ""
echo -e $red ">-------------------------------------------------------------------------<";
echo -e $red "> <";
echo -e $red "> <";
echo -e $red "> ██ █▄▄▄▄ ▄█▄ █▄▄▄▄ ▄█ ▄▄▄▄▄ <";
echo -e $red "> █ █ █ ▄▀ █▀ ▀▄ █ ▄▀ ██ █ ▀▄ <";
echo -e $red "> █▄▄█ █▀▀▌ █ ▀ █▀▀▌ ██ ▄ ▀▀▀▀▄ <";
echo -e $red "> █ █ █ █ █▄ ▄▀ █ █ ▐█ ▀▄▄▄▄▀ <";
echo -e $red "> █ █ ▀███▀ █ ▐ <";
echo -e $red "> █ ▀ ▀ <";
echo -e $red "> ▀ <";
echo -e $red "> <";
function ProgressBar {
# Process data
let _progress=(${1}*100/${2}*100)/100
let _done=(${_progress}*6)/10
let _left=60-$_done
# Build progressbar string lengths
_fill=$(printf "%${_done}s")
_empty=$(printf "%${_left}s")
# 1.2 Build progressbar strings and print the ProgressBar line
# 1.2.1 Output example:
# 1.2.1.1 Progress : [########################################] 100%
printf "\r > Cargando : |${_fill// /▇}${_empty// /-}| ${_progress}%%"
}
# Variables
_start=1
# This accounts as the "totalState" variable for the ProgressBar function
_end=100
# Proof of concept
for number in $(seq ${_start} ${_end})
do
sleep 0.06
ProgressBar ${number} ${_end}
done
#Poniendo el sistema en español
echo ""
echo ""
echo ""
cp .dialogrc /root
chmod +x *
sed -i '177d' /etc/locale.gen
sed -i "177i #en_US.UTF-8 UTF-8" /etc/locale.gen
sed -i '200d' /etc/locale.gen
sed -i "200i es_ES.UTF-8 UTF-8" /etc/locale.gen
locale-gen
echo LANG=es_ES.UTF-8 > /etc/locale.conf
export LANG=es_ES.UTF-8
echo ""
echo -e '\033[m'
sleep 3
#terminus-font
#FONT=ter-v14b /etc/vconsole.conf
#partprobe
sed -i '200d' /etc/locale.gen
sed -i "200i #es_ES.UTF-8 UTF-8" /etc/locale.gen
#Inicio
dialog --backtitle "| Instalación de ArchLinux en Español - https://t.me/ArchLinuxCristo |" \
--column-separator "|" --no-tags --title "| Arch Linux |" --ok-label 'Seleccionar' --no-cancel --menu "\nScript de instalación rápida de Arch Linux\n " 12 50 20 \
1 'Instalar |> Arch Linux' \
2 'Dual Boot |> Arch Linux con Windows' 2>temp
#1 'Instalar |> Arch Linux' \
#3 'Dual Boot |> Arch Linux con Windows' \
#5 'GRUB |> Reparación de Arranque' 2>temp
#2 ' > | Instalar | Arch con Cifrado| <' \
#4 ' > | Dual Boot | GNU/Linux Instalado| <' \
#Opciones
if [ "$?" = "0" ]
then
menu_inicio_return=$(cat temp)
# opción 1 - instalar solo
if [ "$menu_inicio_return" = "1" ]
then
echo "Cargando..."
sleep 3
sh instalar_arch
fi
# opción 2 - Dual Boot - Windows Instalado
if [ "$menu_inicio_return" = "2" ]
then
echo "Cargando..."
sleep 3
sh dual_windows
fi
# opción 5 - Dual Boot - LINUX
if [ "$menu_inicio_return" = "3" ]
then
clear
echo "Cargando..."
sleep 3
sh grub_recu
fi
# Cancelar
else
dialog --backtitle "| Instalación de ArchLinux - https://t.me/ArchLinuxCristo |" --stdout --ok-label 'Reiniciar' --title "| Finalizar |" --msgbox "\n| Comunidad para ayudar: t.me/ArchLinuxCristo |" 7 51
fi