Skip to content

Commit cfe7d46

Browse files
authored
Merge pull request #21 from fryntiz/dev
Nueva Versión v0.2
2 parents 57ac2c3 + 9faa2e5 commit cfe7d46

File tree

9 files changed

+48569
-38
lines changed

9 files changed

+48569
-38
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[Desktop Entry]
2+
Name=Firefox Nightly
3+
Name[es]=Firefox Nightly
4+
Comment=Browse the World Wide Web
5+
Comment[es]=Navegue por la web
6+
GenericName=Web Browser
7+
GenericName[es]=Navegador web
8+
X-GNOME-FullName=Firefox Nightly Web Browser
9+
X-GNOME-FullName[es]=Navegador web Firefox Nightly
10+
Exec=.local/bin/firefox-nightly %u
11+
Terminal=false
12+
X-MultipleArgs=false
13+
Type=Application
14+
Icon=firefox-trunk
15+
Categories=Network;WebBrowser;
16+
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;
17+
StartupWMClass=Firefox-Nightly
18+
StartupNotify=true
19+
Name[es_ES]=firefox-nightly
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[Desktop Entry]
2+
Name=Firefox Quantum
3+
Name[es]=Firefox Quantum
4+
Comment=Browse the World Wide Web
5+
Comment[es]=Navegue por la web
6+
GenericName=Web Browser
7+
GenericName[es]=Navegador web
8+
X-GNOME-FullName=Firefox Quantum Web Browser
9+
X-GNOME-FullName[es]=Navegador web Firefox Quantum
10+
Exec=.local/bin/firefox-quantum %u
11+
Terminal=false
12+
X-MultipleArgs=false
13+
Type=Application
14+
Icon=firefox-developer-icon
15+
Categories=Network;WebBrowser;
16+
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;
17+
StartupWMClass=Firefox-Quantum
18+
StartupNotify=true
19+
Name[es_ES]=firefox-quantum

Instalar_Configuraciones.sh

Lines changed: 49 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -111,42 +111,34 @@ function bashit() {
111111
#Funcion para configurar VIM con sus temas y complementos
112112
function configurar_vim() {
113113
echo -e "$verde Configurando VIM"
114+
115+
function vundle_actualizar_plugins() {
116+
echo | vim +PluginInstall +qall
117+
}
118+
114119
#Instalar Gestor de Plugins Vundle
115-
echo -e "$verde Instalando gestor de plugins$rojo Vundle$verde (Puede tardar un poco)$gris"
116-
if [ -d ~/.vim/bundle/Vundle.vim ]
117-
then #Si existe solo actualiza plugins
118-
echo -e "$verde Vundle ya está instalado, instalando plugins nuevos$gris"
119-
echo | vim +PluginInstall +qall || rm -R ~/.vim/bundle/Vundle.vim #Si falla borra dir
120-
if [ ! -d ~/.vim/bundle/Vundle.vim ] #Comprueba si se ha borrado para rehacer
120+
function vundle_descargar() {
121+
echo -e "$verde Descargando Vundle desde Repositorios"
122+
if [ ! -d ~/.vim/bundle/Vundle.vim ] # Se intenta descargar 10 veces
121123
then
122-
for (( i=1; i<=3; i++ ))
124+
for (( i=1; i<=10; i++ ))
123125
do
124-
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
125-
echo | vim +PluginInstall +qall && break;
126-
if [ $i -eq 3 ]
126+
if [ $i -eq 10 ]
127127
then
128128
rm -R ~/.vim/bundle/Vundle.vim
129-
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
130-
echo | vim +PluginInstall +qall && break;
129+
break
131130
fi
131+
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
132+
vundle_actualizar_plugins && break
132133
done
134+
else
135+
echo -e "$verde Vundle ya está instalado$gris"
133136
fi
134-
else #Instala plugins dentro de ~/.vimrc #Se intenta 3 veces
135-
echo -e "$verde Vundle no está instalado, comenzando descarga$gris"
136-
for (( i=1; i<=3; i++ ))
137-
do
138-
rm -R ~/.vim/bundle/Vundle.vim 2>> /dev/null
139-
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
140-
echo | vim +PluginInstall +qall && break;
141-
if [ $i -eq 3 ]
142-
then
143-
rm -R ~/.vim/bundle/Vundle.vim
144-
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
145-
echo | vim +PluginInstall +qall && break;
146-
fi
147-
done
148-
fi
149-
cd $DIR_ACTUAL
137+
}
138+
139+
# Instalar Vundle y actualizar Plugins
140+
vundle_descargar
141+
vundle_actualizar_plugins
150142

151143
#Funcion para instalar todos los plugins
152144
function vim_plugins() {
@@ -300,9 +292,15 @@ function terminal() {
300292
case $term in
301293
bash | 1)#Establecer bash como terminal
302294
chsh -s /bin/bash
295+
# Cambiar enlace por defecto desde sh a bash
296+
sudo rm /bin/sh
297+
sudo ln -s /bin/bash /bin/sh
303298
break;;
304299
zsh | 2)#Establecer zsh como terminal
305300
chsh -s /bin/zsh
301+
# Cambiar enlace por defecto desde sh a zsh
302+
sudo rm /bin/sh
303+
sudo ln -s /bin/zsh /bin/sh
306304
break;;
307305
*)#Opción errónea
308306
echo -e "$rojo Opción no válida$gris"
@@ -318,15 +316,38 @@ function configurar_gedit() {
318316
cp -r ./gedit/.config/gedit/* ~/.config/gedit/
319317
}
320318

319+
#Crea un archivo hosts muy completo que bloquea bastantes sitios malignos en la web
320+
function configurar_hosts() {
321+
echo -e "$verde Configurar archivo$rojo /etc/hosts"
322+
323+
function hosts_backup() {
324+
if [ ! -f /etc/hosts.BACKUP ]
325+
then
326+
sudo mv /etc/hosts /etc/hosts.BACKUP
327+
else
328+
mkdir -p TMP 2>> /dev/null
329+
cat /etc/hosts > ./TMP/hosts
330+
cat ./etc/hosts >> ./TMP/hosts
331+
sudo cp ./TMP/hosts /etc/hosts
332+
fi
333+
}
334+
335+
hosts_backup
336+
}
337+
321338
#Instalar Todas las configuraciones
322339
function instalar_configuraciones() {
323340
bashit
324341
ohMyZSH
325342
permisos
326343
programas_default
327344
configurar_vim
345+
346+
cd $DIR_SRCIPT
347+
328348
configurar_gedit
329349
agregar_conf_home
350+
configurar_hosts
330351
terminal #Pregunta el terminal a usar
331352

332353
sudo update-command-not-found

Instalar_Software.sh

Lines changed: 178 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function atom_install() {
5252
# Comprobación si existe instalado el complemento
5353
if [ -d "$HOME/.atom/packages/$p" ]
5454
then
55-
echo -e "$verde Ya se encuentra instalado → $p"
55+
echo -e "$amarillo Ya se encuentra instalado →$rojo $p"
5656
else
5757
echo -e "$verde Instalando$rojo $p $amarillo"
5858
apm install $p
@@ -107,7 +107,7 @@ function dbeaver_install() {
107107

108108
#Instala el editor de python Ninja IDE
109109
function ninjaide_install() {
110-
if [ -f /usr/bin/ninja-ide ]
110+
if [ -f /usr/bin/e ]
111111
then
112112
echo -e "$verde Ya esta$rojo Ninja IDE$verde instalado en el equipo, omitiendo paso$gris"
113113
else
@@ -120,7 +120,7 @@ function ninjaide_install() {
120120
done
121121
echo -e "$verde Preparando para instalar$rojo Ninja IDE$gris"
122122
sudo apt install -y python-qt4 >> /dev/null 2>> /dev/null && echo -e "$verde Se ha instalado$rojo python-qt4$gris" || echo -e "$verde No se ha instalado$rojo python-qt4$gris"
123-
sudo dpkg -i -y ninja-ide_2.3-2_all.deb && sudo apt install -f -y
123+
sudo dpkg -i ninja-ide_2.3-2_all.deb && sudo apt install -f -y
124124
fi
125125

126126
#Resolviendo dependencia de libreria QtWebKit.so si no existe
@@ -136,24 +136,195 @@ function ninjaide_install() {
136136
sudo apt install -y python-git python3-git 2>> /dev/null
137137
}
138138

139-
#Recorrer "Software.lst" Instalando paquetes ahí descritos
139+
function haroopad_install() {
140+
if [ -f /usr/bin/haroopad ]
141+
then
142+
echo -e "$verde Ya esta$rojo Haroopad$verde instalado en el equipo, omitiendo paso$gris"
143+
else
144+
REINTENTOS=3
145+
echo -e "$verde Descargando$rojo Haroopad$gris"
146+
for (( i=1; i<=$REINTENTOS; i++ ))
147+
do
148+
rm haroopad-v0.13.1-x64.deb 2>> /dev/null
149+
wget --show-progress https://bitbucket.org/rhiokim/haroopad-download/downloads/haroopad-v0.13.1-x64.deb && break
150+
done
151+
echo -e "$verde Preparando para instalar$rojo Haroopad$gris"
152+
sudo dpkg -i haroopad-v0.13.1-x64.deb && sudo apt install -f -y
153+
fi
154+
}
155+
156+
function gitkraken_install() {
157+
if [ -f /usr/bin/gitkraken ]
158+
then
159+
echo -e "$verde Ya esta$rojo Gitkraken$verde instalado en el equipo, omitiendo paso$gris"
160+
else
161+
REINTENTOS=3
162+
echo -e "$verde Descargando$rojo Gitkraken$gris"
163+
for (( i=1; i<=$REINTENTOS; i++ ))
164+
do
165+
rm gitkraken-amd64.deb 2>> /dev/null
166+
wget --show-progress https://release.gitkraken.com/linux/gitkraken-amd64.deb && break
167+
done
168+
echo -e "$verde Preparando para instalar$rojo Gitkraken$gris"
169+
sudo dpkg -i gitkraken-amd64.deb && sudo apt install -f -y
170+
fi
171+
}
172+
173+
# TODO → Crear perfiles básicos, copiarlos a su ruta correspondiente y asignarlos a cada versión
174+
# Instalar versiones de Firefox
175+
function firefox_install() {
176+
177+
# Si no existen los directorios se crearán
178+
if [ ! -d ~/.local/opt ]
179+
then
180+
mkdir -p ~/.local/opt
181+
fi
182+
183+
if [ ! -d ~/.local/bin ]
184+
then
185+
mkdir -p ~/.local/bin
186+
fi
187+
188+
if [ ! -d ~/.local/share/applications ]
189+
then
190+
mkdir -p ~/.local/share/applications
191+
fi
192+
193+
# Firefox Quantum Developer Edition
194+
function firefox_developer() {
195+
196+
function instalar() {
197+
# Desempaquetar Firefox-Nightly_amd64.tar.bz2
198+
tar -xjvf Firefox-Quantum-Developer_amd64.tar.bz2 2>> /dev/null
199+
200+
# Mover archivo extraido a su ubicación final
201+
mv firefox ~/.local/opt/Firefox_Quantum_Developer 2>> /dev/null
202+
203+
# Crear enlaces de usuario y permisos de ejecución
204+
ln -s ~/.local/opt/Firefox_Quantum_Developer/firefox ~/.local/bin/firefox-quantum
205+
chmod +x ~/.local/bin/firefox-quantum
206+
207+
# Copiar acceso directo
208+
cp Accesos_Directos/firefox-quantum.desktop ~/.local/share/applications/
209+
210+
# TODO → Autogenerar y asociar un perfil existente con el mismo nombre de la version
211+
# Pedir crear perfil
212+
echo -e "$verde Para evitar conflictos entre distintas versiones crea un perfil"
213+
echo -e "$verde Al pulsar una tecla se abrirá una ventana para ello"
214+
echo -e "$verde El nombre convendrá que sea lógico como →$rojo Firefox-Quantum$amarillo"
215+
read -p "Pulsa una tecla para abrir el ProfileManager" x
216+
~/.local/bin/firefox-quantum --ProfileManager
217+
}
218+
219+
220+
if [ -f ~/.local/bin/firefox-quantum ]
221+
then
222+
echo -e "$verde Ya esta$rojo Firefox Quantum Developer Edition$verde instalado en el equipo, omitiendo paso$gris"
223+
# Comprueba que no está el archivo descargado en este directorio
224+
elif [ ! -f ./Firefox-Quantum-Developer_amd64.tar.bz2 ]
225+
then
226+
REINTENTOS=3
227+
echo -e "$verde Descargando$rojo Firefox Quantum Developer Edition$gris"
228+
for (( i=1; i<=$REINTENTOS; i++ ))
229+
do
230+
rm Firefox-Quantum-Developer_amd64.tar.bz 2>> /dev/null
231+
wget --show-progress -r -A tar.bz2 'https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=es-ES' -O Firefox-Quantum-Developer_amd64.tar.bz2 && break
232+
done
233+
echo -e "$verde Preparando para instalar$rojo Firefox Quantum Developer Edition$gris"
234+
235+
instalar
236+
else
237+
instalar
238+
fi
239+
}
240+
241+
# Firefox Nightly
242+
function firefox_nightly() {
243+
244+
function instalar() {
245+
# Desempaquetar Firefox-Nightly_amd64.tar.bz2
246+
tar -xjvf Firefox-Nightly_amd64.tar.bz2 2>> /dev/null
247+
248+
# Mover archivo extraido a su ubicación final
249+
mv firefox ~/.local/opt/Firefox_Nightly 2>> /dev/null
250+
251+
# Crear enlaces de usuario y permisos de ejecución
252+
ln -s ~/.local/opt/Firefox_Nightly/firefox ~/.local/bin/firefox-nightly
253+
chmod +x ~/.local/bin/firefox-nightly
254+
255+
# Copiar acceso directo
256+
cp Accesos_Directos/firefox-nightly.desktop ~/.local/share/applications/
257+
258+
# TODO → Autogenerar y asociar un perfil existente con el mismo nombre de la version
259+
# Pedir crear perfil
260+
echo -e "$verde Para evitar conflictos entre distintas versiones crea un perfil"
261+
echo -e "$verde Al pulsar una tecla se abrirá una ventana para ello"
262+
echo -e "$verde El nombre convendrá que sea lógico como →$rojo Firefox-Nightly$amarillo"
263+
read -p "Pulsa una tecla para abrir el ProfileManager" x
264+
~/.local/bin/firefox-nightly --ProfileManager
265+
}
266+
267+
268+
if [ -f ~/.local/bin/firefox-nightly ]
269+
then
270+
echo -e "$verde Ya esta$rojo Firefox Nightly$verde instalado en el equipo, omitiendo paso$gris"
271+
elif [ ! -f ./Firefox-Nightly_amd64.tar.bz2 ]
272+
then
273+
REINTENTOS=3
274+
echo -e "$verde Descargando$rojo Firefox Nightly$gris"
275+
for (( i=1; i<=$REINTENTOS; i++ ))
276+
do
277+
rm Firefox-Nightly_amd64.tar.bz2 2>> /dev/null
278+
wget --show-progress -r -A tar.bz2 'https://download.mozilla.org/?product=firefox-nightly-latest-l10n-ssl&os=linux64&lang=es-ES' -O Firefox-Nightly_amd64.tar.bz2 && break
279+
done
280+
echo -e "$verde Preparando para instalar$rojo Firefox Nightly$gris"
281+
282+
instalar
283+
else
284+
instalar
285+
fi
286+
}
287+
288+
# Llamada a ejecución las funciones que instalan y configuran navegadores firefox
289+
firefox_developer
290+
firefox_nightly
291+
}
292+
293+
# Recorrer "Software.lst" Instalando paquetes ahí descritos
140294
function instalar_Software() {
295+
# Actualizar LIstas
141296
echo -e "$verde Actualizando listas de$rojo Repositorios$verde (Paciencia)$gris"
142297
sudo apt update >> /dev/null 2>> /dev/null
298+
299+
# Repara errores de dependencias rotas que pudiesen haber
143300
echo -e "$verde Comprobando estado del$rojo Gestor de paquetes$verde (Paciencia)$gris"
144-
sudo apt --fix-broken install 2>> /dev/null
145-
sudo apt install -f -y 2>> /dev/null
301+
sudo apt --fix-broken install -y >> /dev/null 2>> /dev/null
302+
sudo apt install -f -y >> /dev/null 2>> /dev/null
303+
304+
# Instalando todo el software desde "Software.lst
146305
echo -e "$verde Instalando Software adicional$gris"
306+
# La siguiente variable guarda toda la lista de paquetes desde DPKG
307+
lista_todos_paquetes=${dpkg-query -W -f='${Installed-Size} ${Package}\n' | sort -n | cut -d" " -f2}
147308
for s in $software
148309
do
149-
sudo apt install -y $s >> /dev/null 2>> /dev/null && echo -e "$rojo $s$verde instalado correctamente" || echo -e "$rojo $s$verde No se ha instalado"
310+
# TODO → Mirar si se puede añadir al siguiente if algo similar a:
311+
# [ $s in lista_todos_paquetes ]
312+
if [ -f /bin/$s ] || [ -f /usr/bin/$s ]
313+
then
314+
echo -e "$rojo $s$verde ya estaba instalado"
315+
else
316+
sudo apt install -y $s >> /dev/null 2>> /dev/null && echo -e "$rojo $s$verde instalado correctamente" || echo -e "$rojo $s$amarillo No se ha instalado$gris"
317+
fi
150318
done
151319

152320
#Instalaciones de software independiente
153321
atom_install
154322
brackets_install
155323
dbeaver_install
156324
ninjaide_install
325+
haroopad_install
326+
gitkraken_install
327+
firefox_install
157328

158329
sudo apt --fix-broken install 2>> /dev/null
159330
sudo apt install -f -y 2>> /dev/null

Servidores.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ function server_php() {
9393
function personalizar_php() {
9494
echo -e "$verde Personalizando PHP$gris"
9595

96+
# TODO → Implementar control si fallan las descargas en "psysh
9697
# Intérprete interactivo de PHP → psysh
9798
echo -e "$verde Instalar Intérprete$rojo psysh $gris"
9899
wget --show-progress https://git.io/psysh -O ~/.local/bin/psysh

0 commit comments

Comments
 (0)