-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython.sh
More file actions
127 lines (99 loc) · 3.3 KB
/
python.sh
File metadata and controls
127 lines (99 loc) · 3.3 KB
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
#!/bin/bash
### Hecho por Yordis Cujar
FECHA=$(date +"%Y-%m-%d")
function chiguire()
{
clear
echo -e "\033[33m@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
echo -e "\033[33m@@@@@@@%#++*###*=@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
echo -e "\033[33m@@@@@#***++=-===+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
echo -e "\033[33m@@@@=-=-+*++++*+#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
echo -e "\033[33m@@@%*++-+*+**+**+*%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
echo -e "\033[33m@@@@#=++#*+++=+++**%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
echo -e "\033[33m@@@@@*====--:-=++*####%%@@@@@@@@@@@@@@@@@@@@@@@@@@"
echo -e "\033[33m@@@@@@@@= :=++*****+**####%%%%%@@@@@@@@@@@@@@@@@"
echo -e "\033[33m@@@@@@@@#::-=++****+=+++*###########%@@@@@@@@@@@@@"
echo -e "\033[33m@@@@@@@@*-==+++**++++++++*********#####%%@@@@@@@@@"
echo -e "\033[33m@@@@@@@@*=++++++++++++++******************%@@@@@@@"
echo -e "\033[33m@@@@@@@@@+++**+===++++=++****#***********++%@@@@@@"
echo -e "\033[33m@@@@@@@@@#=++**=-+====+****************++*+=#@@@@@"
echo -e "\033[33m@@@@@@@@@@#=+++==---:-=+++***+*++*++***+**+==@@@@@"
echo -e "\033[33m@@@@@@@@@@@*--.-==: .-=-==++++++++**+*****+==%@@@@"
echo -e "\033[33m@@@@@@@@@@@@+:.:-==:..:--======*++**+**++*+==%@@@@"
echo -e "\033[33m@@@@@@@@@@@@@=.:-=-%%-...::::-+**++*+++=++==-#@@@@"
echo -e "\033[33m@@@@@@@@@@@@@*::=-=@@@%*=:..:=+++++=++==+==-:#@@@@"
echo -e "\033[33m@@@@@@@@@%%*==.-=--+***+*+: :-=--=:----:::.-@@@@@"
echo -e "\033[33m@@@@@@@@%%*++--=----+====-:... ..::::---==+*@@@@@@"
echo -e "\033[33m@@@@@@@@@@@@%%##**####%%%##****##%%%@@@@@@@@@@@@@@"
echo -e "\033[33m@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
echo -e "\033[33m@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
sleep 2s
clear
}
function fabricante()
{
clear
echo -e "\033[4mhttps://github.com/yordisc/"
sleep 2s
clear
}
function inicio()
{
clear
echo " "
echo " "
echo -e "\033[34m##############################"
echo -e "\033[34m# Instalar versión de Python #"
echo -e "\033[34m##############################"
echo " "
echo " "
sleep 2s
clear
}
function version()
{
Xversion="3.10.1"
echo "elige la versión de Python (version actual: $Xversion)"
read number
while ! [[ $number =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || [ "$number" -lt 1 ]; do
echo "El valor introducido no es válido. Por favor, introduzca un número valido o tomara la versión $Xversion."
read number
if [[ -z "$number" ]]; then
number="$Xversion"
fi
done
Xversion="$number"
echo "elegiste la versión de Python: ($Xversion)"
sleep 2s
clear
}
function installpy()
{
clear
echo -e "\033[32mIniciando..."
sleep 2s
### Instalador de Python
pyversion="$Xversion"
cd ~
rm -r pyth0ninst6ll
mkdir pyth0ninst6ll
sudo chmod -R 777 pyth0ninst6ll
sudo chown -R $USER pyth0ninst6ll
cd pyth0ninst6ll
wget https://www.python.org/ftp/python/$pyversion/Python-$pyversion.tgz
tar xvf Python-$pyversion.tgz$ cd Python-$pyversion
./configure --enable-optimizations --with-ensurepip=install
make -j 8
sudo make altinstall
cd ~
rm -r pyth0ninst6ll
echo -e "\033[32m#----------------------------Versión de Python Instalado-----------------------------#"
}
##### Inicio del programa ######
fabricante
chiguire
inicio
version
installpy
chiguire
fabricante