Skip to content

Commit e3ee30a

Browse files
authored
Merge pull request #137 from fryntiz/dev
Versión 0.6.1
2 parents 6c71404 + afaf8e6 commit e3ee30a

File tree

9 files changed

+171
-18
lines changed

9 files changed

+171
-18
lines changed

Apps/2_Aplicaciones_Extras.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,11 @@
2828
############################
2929
## IMPORTACIONES ##
3030
############################
31-
source "$WORKSCRIPT/Apps/bashit.sh"
3231
source "$WORKSCRIPT/Apps/DBeaver.sh"
3332
source "$WORKSCRIPT/Apps/GitKraken.sh"
3433
source "$WORKSCRIPT/Apps/Haroopad.sh"
3534
source "$WORKSCRIPT/Apps/i3wm.sh"
36-
source "$WORKSCRIPT/Apps/OhMyZsh.sh"
3735
source "$WORKSCRIPT/Apps/Pencil-Project.sh"
38-
source "$WORKSCRIPT/Apps/vim.sh"
3936

4037
############################
4138
## FUNCIONES ##
@@ -46,7 +43,4 @@ aplicaciones_extras() {
4643
gitkraken_instalador
4744
haroopad_instalador
4845
pencilProject_instalador
49-
vim_Instalador
50-
bashit_Instalador
51-
ohmyzsh_Instalador
5246
}

Apps/3_Aplicaciones_Usuario.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222
############################
2323
## IMPORTACIONES ##
2424
############################
25+
source "$WORKSCRIPT/Apps/bashit.sh"
26+
source "$WORKSCRIPT/Apps/OhMyZsh.sh"
2527
source "$WORKSCRIPT/Apps/Firefox.sh"
28+
source "$WORKSCRIPT/Apps/spacevim.sh"
29+
source "$WORKSCRIPT/Apps/vim.sh"
2630

2731
############################
2832
## FUNCIONES ##
@@ -42,4 +46,24 @@ aplicaciones_usuarios() {
4246
echo -e "$VE Instalando Aplicaciones específicas para el usuario$RO $USER$CL"
4347
configurar_heroku
4448
firefox_instalador
49+
bashit_Instalador
50+
ohmyzsh_Instalador
51+
52+
while true; do
53+
echo -e "$VE ¿Quieres instalar$RO vim$VE o$RO spacevim$CL"
54+
echo -e "$RO 1)$VE vim$CL"
55+
echo -e "$RO 2)$VE spacevim$CL"
56+
read -p "" editor
57+
case "$editor" in
58+
vim | 1)
59+
vim_Instalador
60+
break;;
61+
spacevim | 2)
62+
spacevim_Instalador
63+
break;;
64+
*) ## Opción errónea
65+
clear
66+
echo -e "$RO Opción no válida$CL"
67+
esac
68+
done
4569
}

Apps/spacevim.sh

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/usr/bin/env bash
2+
# -*- ENCODING: UTF-8 -*-
3+
##
4+
## @author Raúl Caro Pastorino
5+
## @copyright Copyright © 2017 Raúl Caro Pastorino
6+
## @license https://wwww.gnu.org/licenses/gpl.txt
7+
## @email tecnico@fryntiz.es
8+
## @web www.fryntiz.es
9+
## @github https://github.com/fryntiz
10+
## @gitlab https://gitlab.com/fryntiz
11+
## @twitter https://twitter.com/fryntiz
12+
##
13+
## Guía de estilos aplicada:
14+
## @style https://github.com/fryntiz/Bash_Style_Guide
15+
16+
############################
17+
## INSTRUCCIONES ##
18+
############################
19+
## Este script instala SpaceVim desde su sitio oficial
20+
21+
############################
22+
## FUNCIONES ##
23+
############################
24+
spacevim_preconfiguracion() {
25+
echo -e "$VE Generando Pre-Configuraciones de$RO Space Vim$CL"
26+
27+
## Si el directorio de configuración para vim es un enlace, se quita
28+
if [[ -h "$HOME/.vim" ]]; then
29+
rm -f "$HOME/.vim"
30+
fi
31+
32+
## Si el archivo de configuración para vim es un enlace, se quita
33+
if [[ -h "$HOME/.vimrc" ]]; then
34+
rm -f "$HOME/.vimrc"
35+
fi
36+
}
37+
38+
spacevim_instalar() {
39+
echo -e "$VE Preparando para instalar$RO Space Vim$CL"
40+
curl -sLf 'https://spacevim.org/install.sh' | bash
41+
}
42+
43+
spacevim_postconfiguracion() {
44+
echo -e "$VE Generando Post-Configuraciones$RO Space Vim$CL"
45+
}
46+
47+
spacevim_Instalador() {
48+
echo -e "$VE Comenzando instalación de$RO Space Vim$CL"
49+
50+
spacevim_preconfiguracion
51+
spacevim_instalar
52+
spacevim_postconfiguracion
53+
}

Apps/vim.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,19 @@
2727
############################
2828
vim_preconfiguracion() {
2929
echo -e "$VE Generando Pre-Configuraciones de$RO Vim$CL"
30+
31+
## Si el directorio de configuración para vim es un enlace, se borra
32+
if [[ -h "$HOME/.vim" ]]; then
33+
rm -f "$HOME/.vim"
34+
fi
35+
3036
local archivosConfiguracion='.vim .vimrc .gvimrc'
3137

3238
## Enlazar archivos de este repo
3339
enlazarHome "$archivosConfiguracion"
3440

3541
vim_colores() {
36-
if [[ ! -d "$HOME/vim/colors" ]]; then
42+
if [[ ! -d "$HOME/.vim/colors" ]]; then
3743
mkdir -p "$HOME/.vim/colors"
3844
fi
3945

@@ -75,7 +81,7 @@ vim_instalar() {
7581
local dependencias=(vim vim-addon-manager vim-addon-mw-utils vim-asciidoc vim-athena vim-autopep8 vim-command-t vim-conque vim-ctrlp vim-editorconfig vim-fugitive vim-gnome vim-gocomplete vim-gtk vim-gtk3 vim-haproxy vim-icinga2 vim-khuno vim-lastplace vim-latexsuite vim-migemo vim-nox vim-pathogen vim-python-jedi vim-rails vim-runtime vim-scripts vim-snipmate vim-snippets vim-syntastic vim-syntax-gtk vim-tabular vim-tjp vim-tlib vim-ultisnips vim-vimerl vim-vimerl-syntax vim-vimoutliner vim-voom vim-youcompleteme)
7682
for s in "${dependencias[@]}"; do
7783
for x in "${lista_todos_paquetes[@]}"; do
78-
if [[ $s = $x ]]; then
84+
if [[ "$s" = "$x" ]]; then
7985
echo -e "$RO $s$VE ya estaba instalado$CL"
8086
break
8187
else

Personalizar/Tipografías.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,24 @@ agregar_fuentes() {
4343
sudo cp -r "$HOME/fonts/$f/" '/usr/local/share/fonts/'
4444
fi
4545
done
46+
47+
nerd_fonts() {
48+
if [[ -d "$WORKSCRIPT/tmp/nerd-fonts" ]]; then
49+
cd "$WORKSCRIPT/tmp/nerd-fonts" || exit && cd "$WORKSCRIPT" || exit
50+
git checkout -- .
51+
git pull
52+
else
53+
git clone --depth 1 'https://github.com/ryanoasis/nerd-fonts.git' "$WORKSCRIPT/tmp/nerd-fonts"
54+
fi
55+
56+
cd "$WORKSCRIPT/tmp/nerd-fonts" || exit
57+
./install.sh
58+
cd "$WORKSCRIPT" || exit
59+
}
60+
61+
echo -e "$VE ¿Instalar$RO Nerd-Fonts$VE, ocupará más de 1GB (y su descarga)?"
62+
read -p ' y/N → ' YN
63+
if [[ "$YN" = 'y' ]] || [[ "$YN" = 'Y' ]]; then
64+
nerd_fonts
65+
fi
4666
}

Servidores/0_Main.sh

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ source "$WORKSCRIPT/Servidores/nodejs.sh"
2929
source "$WORKSCRIPT/Servidores/php.sh"
3030
source "$WORKSCRIPT/Servidores/postgreSQL.sh"
3131
source "$WORKSCRIPT/Servidores/python.sh"
32+
source "$WORKSCRIPT/Servidores/ruby.sh"
3233

3334
###########################
3435
## FUNCIONES ##
@@ -47,6 +48,7 @@ menuServidores() {
4748
php_instalador
4849
postgresql_instalador
4950
python_instalador
51+
ruby_instalador
5052
}
5153

5254
## Si la función recibe "-a" indica que instale todos los servidores
@@ -55,14 +57,15 @@ menuServidores() {
5557
else
5658
while true :; do
5759
clear
58-
local descripcion='Menú de aplicaciones
60+
local descripcion='Menú de Servidores y Lenguajes de programación
5961
1) Apache
6062
2) MariaDB
6163
3) NodeJS
6264
4) PHP
6365
5) PostgreSQL
6466
6) Python
65-
7) Todos los pasos anteriores
67+
7) Ruby
68+
8) Todos los pasos anteriores
6669
6770
0) Atrás
6871
'
@@ -75,12 +78,13 @@ menuServidores() {
7578
case $entrada in
7679

7780
1) apache2_instalador;; ## Instala servidor Apache2
78-
2) mariadb_instalador;; ## Instala PHP
79-
3) nodejs_instalador;; ## Instala servidores SQL
80-
4) php_instalador;; ## Instala Python
81-
5) postgresql_instalador;; ## Instala servidor NodeJS
82-
6) python_instalador;; ## Instala servidor NodeJS
83-
7) todos_servidores ## Todas las aplicaciones
81+
2) mariadb_instalador;; ## Instala MariaDB
82+
3) nodejs_instalador;; ## Instala NodeJS
83+
4) php_instalador;; ## Instala PHP
84+
5) postgresql_instalador;; ## Instala PostgreSQL
85+
6) python_instalador;; ## Instala Python
86+
7) ruby_instalador;; ## Instala Ruby
87+
8) todos_servidores ## Todos los servidores
8488
break;;
8589

8690
0) ## SALIR

Servidores/ruby.sh

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/usr/bin/env bash
2+
# -*- ENCODING: UTF-8 -*-
3+
##
4+
## @author Raúl Caro Pastorino
5+
## @copyright Copyright © 2017 Raúl Caro Pastorino
6+
## @license https://wwww.gnu.org/licenses/gpl.txt
7+
## @email tecnico@fryntiz.es
8+
## @web www.fryntiz.es
9+
## @github https://github.com/fryntiz
10+
## @gitlab https://gitlab.com/fryntiz
11+
## @twitter https://twitter.com/fryntiz
12+
##
13+
## Guía de estilos aplicada:
14+
## @style https://github.com/fryntiz/Bash_Style_Guide
15+
16+
############################
17+
## INSTRUCCIONES ##
18+
############################
19+
20+
ruby_descargar() {
21+
echo "$VE Descargando$RO Ruby$CL"
22+
}
23+
24+
ruby_preconfiguracion() {
25+
echo -e "$VE Generando Pre-Configuraciones de$RO Ruby"
26+
}
27+
28+
ruby_instalar() {
29+
echo -e "$VE Instalando$RO Ruby$CL"
30+
instalarSoftware 'ruby' 'ruby-full'
31+
32+
echo -e "$VE Instalando gestor de paquetes$RO Rbenv$CL"
33+
instalarSoftware 'rbenv'
34+
35+
echo -e "$VE Instalando paquetes complementarios de$RO Ruby$CL"
36+
local complementarios='rubygems-integration ruby-base64 ruby-bcrypt ruby-cairo ruby-clutter ruby-color ruby-crack ruby-curses ruby-debian ruby-dbus ruby-http ruby-i18n ruby-inline ruby-indentation ruby-json ruby-mime ruby-mongo ruby-ncurses ruby-nenv ruby-neovim ruby-net-ssh ruby-password ruby-pg ruby-pkg-config ruby-rbpdf ruby-rbpdf-font ruby-sqlite3 ruby-twitter ruby-zip'
37+
instalarSoftware "$complementarios"
38+
}
39+
40+
ruby_postconfiguracion() {
41+
echo -e "$VE Generando Post-Configuraciones de Ruby$CL"
42+
}
43+
44+
ruby_instalador() {
45+
ruby_descargar
46+
ruby_preconfiguracion
47+
ruby_instalar
48+
ruby_postconfiguracion
49+
}

conf/home/.vimrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ filetype plugin indent on
1717
set fdm=syntax
1818
set foldlevelstart=20
1919

20+
python3 from powerline.vim import setup as powerline_setup
21+
python3 powerline_setup()
22+
python3 del powerline_setup
23+
2024
let python_highlight_all=1
2125
let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree
2226

main.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ CL="\e[0m" ## Limpiar colores
4040

4141
WORKSCRIPT=$PWD ## Directorio principal del script
4242
USER=$(whoami) ## Usuario que ejecuta el script
43-
VERSION='0.6.0' ## Versión en desarrollo
43+
VERSION='0.6.1' ## Versión en desarrollo
4444
LOGERROR="$WORKSCRIPT/errores.log" ## Archivo donde almacenar errores
4545
DEBUG=false ## Establece si está el script en modo depuración
4646

@@ -58,7 +58,6 @@ source "$WORKSCRIPT/Personalizar/Personalización_GTK.sh"
5858
source "$WORKSCRIPT/Personalizar/Tipografías.sh"
5959
source "$WORKSCRIPT/Personalizar/Variables_Entorno.sh"
6060
source "$WORKSCRIPT/Servidores/0_Main.sh"
61-
source "$WORKSCRIPT/variables.sh"
6261

6362
###########################
6463
## VARIABLES ##

0 commit comments

Comments
 (0)