Skip to content

Commit 3f8ce54

Browse files
authored
Merge pull request #22 from fryntiz/dev
Importantes Mejoras
2 parents cfe7d46 + 14b8faa commit 3f8ce54

File tree

10 files changed

+229
-211
lines changed

10 files changed

+229
-211
lines changed

Instalar_Configuraciones.sh

Lines changed: 42 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -91,20 +91,26 @@ function bashit() {
9191
sudo apt install -y rbenv >> /dev/null 2>> /dev/null
9292

9393
#Habilitar todos los plugins
94-
#TOFIX → ENTRA CUANDO NO TIENE QUE ENTRAR E INTENTA INSTALAR LO QUE NO TIENE QUE INSTALAR DANDO ERROR
95-
#SIEMPRE ESTOY EN BASH.... tratar modo de que solo entre cuando estoy con perfil de bash cargado y bashit instalado
96-
if [ -z $BASH ]
97-
then
98-
echo -e "$verde Para habilitar los$rojo plugins$verde ejecuta este scripts desde$rojo bash$gris"
99-
elif [ -n $BASH ] && [ "$BASH" = '/bin/bash' ]
94+
#TOFIX → Este paso solo puede hacerse correctamente cuando usamos /bin/bash
95+
plugins_habilitar="alias-completion aws base battery edit-mode-vi explain extract fasd git gif hg java javascript latex less-pretty-cat node nvm postgres projects python rails ruby sshagent ssh subversion xterm dirs nginx plenv pyenv rbenv"
96+
97+
if [ -n $BASH ] && [ $BASH = '/bin/bash' ]
10098
then
10199
echo -e "$verde Habilitando todos los plugins para$rojo Bashit$gris"
102-
bash-it enable plugin all
103-
#Deshabilitar plugins no usados o deprecated
100+
101+
# Incorpora archivo de bashit
102+
source ~/.bash_it/bash_it.sh
103+
104+
for p in $plugins_habilitar
105+
do
106+
bash-it enable plugin $p
107+
done
108+
109+
#Asegurar que los plugins conflictivos estén deshabilitados:
104110
echo -e "$verde Deshabilitando plugins no usados en$rojo Bashit$gris"
105-
bash-it disable plugin chruby chruby-auto z z_autoenv
111+
bash-it disable plugin chruby chruby-auto z z_autoenv visual-studio-code gh
106112
else
107-
echo -e "$verde Asegurate de ejecutar con$rojo bash$verde este$rojo script$verde para poder instalar plugins$gris"
113+
echo -e "$verde Para habilitar los$rojo plugins de BASH$verde ejecuta este scripts desde$rojo bash$gris"
108114
fi
109115
}
110116

@@ -142,8 +148,8 @@ function configurar_vim() {
142148

143149
#Funcion para instalar todos los plugins
144150
function vim_plugins() {
145-
plugins_vim=("align" "closetag" "powerline" "youcompleteme" "xmledit" "autopep8" "python-jedi" "python-indent" "utilsinps" "utl" "rails" "snippets" "fugitive" "ctrlp")
146-
for plugin in ${plugins_vim[*]}
151+
plugins_vim=("align closetag powerline youcompleteme xmledit autopep8 python-jedi python-indent utilsinps utl rails snippets fugitive ctrlp tlib tabular sintastic detectindent closetag align syntastic")
152+
for plugin in $plugins_vim
147153
do
148154
echo -e "$verde Activando el plugin → $rojo $plugin$yellow"
149155
vim-addon-manager install $plugin >> /dev/null 2>> /dev/null
@@ -156,15 +162,16 @@ function configurar_vim() {
156162
mkdir -p ~/.vim/colors 2>> /dev/null
157163
#Creando archivos de colores, por defecto usara "monokai"
158164
echo -e "$verde Descargando colores para sintaxis$amarillo"
165+
159166
if [ ! -f "~/.vim/colors/wombat.vim" ]
160167
then
161168
wget http://www.vim.org/scripts/download_script.php?src_id=6657 -O ~/.vim/colors/wombat.vim
162169
fi
163170

164171
echo -e "$verde Descargando Tema$rojo Monokai$amarillo"
165-
if [ ! -f "~/.vim/colors/monokai.vim" ]
172+
if [ ! -f "~/.vim/colors/monokai1.vim" ]
166173
then
167-
wget https://raw.githubusercontent.com/lsdr/monokai/master/colors/monokai.vim -O ~/.vim/colors/monokai.vim
174+
wget https://raw.githubusercontent.com/lsdr/monokai/master/colors/monokai.vim -O ~/.vim/colors/monokai_1.vim
168175
fi
169176
echo -e "$verde Se ha concluido la instalacion de temas de colores$gris"
170177
}
@@ -175,22 +182,21 @@ function configurar_vim() {
175182

176183
#Agregar Archivos de configuración al home
177184
function agregar_conf_home() {
178-
conf=$(ls -A ./home/)
185+
conf=$(ls -A ./home/)
179186
echo -e "$verde Preparando para añadir archivos de configuración en el home de usuario$gris"
180-
for c in $conf
187+
188+
for c in $conf
181189
do
182-
if [ -f ~/$c ] || [ -d ~/$c ] #Si existe hago backup
190+
# Crea backup del directorio o archivo si no tiene una anterior
191+
if [ ! -f "~/$c.BACKUP" ] || [ ! -d "~/$c.BACKUP" ]
183192
then
184-
if [ -f "~/$c.BACKUP" ] || [ -f "~/$c.BACKUP" ] #Contemplo que exista copia y no la borra
185-
then
186-
rm ~/$c 2>> /dev/null
187-
else
188-
echo -e "$verde Creando backup de ~/home/$(whoami)/$c $gris"
189-
mv ~/$c ~/$c.BACKUP 2>> /dev/null
190-
fi
193+
echo -e "$verde Creando backup de ~/home/$(whoami)/$c $gris"
194+
mv ~/$c ~/$c.BACKUP 2>> /dev/null
191195
fi
192-
echo -e "$verde Generando configuración$gris"
193-
cp -r ./home/$c ~/$c 2>> /dev/null
196+
197+
# Mover archivos al home
198+
echo -e "$verde Generando configuración de$rojo $c$gris"
199+
cp -R -f ./home/$c ~/$c 2>> /dev/null
194200
done
195201
}
196202

@@ -320,19 +326,16 @@ function configurar_gedit() {
320326
function configurar_hosts() {
321327
echo -e "$verde Configurar archivo$rojo /etc/hosts"
322328

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-
}
329+
# Crea copia del original para mantenerlo siempre
330+
if [ ! -f /etc/hosts.BACKUP ]
331+
then
332+
sudo mv /etc/hosts /etc/hosts.BACKUP
333+
fi
334334

335-
hosts_backup
335+
mkdir -p TMP 2>> /dev/null
336+
cat /etc/hosts.BACKUP > ./TMP/hosts
337+
cat ./etc/hosts >> ./TMP/hosts
338+
sudo cp ./TMP/hosts /etc/hosts
336339
}
337340

338341
#Instalar Todas las configuraciones
@@ -341,12 +344,12 @@ function instalar_configuraciones() {
341344
ohMyZSH
342345
permisos
343346
programas_default
344-
configurar_vim
345347

346348
cd $DIR_SRCIPT
347349

348350
configurar_gedit
349351
agregar_conf_home
352+
configurar_vim
350353
configurar_hosts
351354
terminal #Pregunta el terminal a usar
352355

Instalar_Software.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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/e ]
110+
if [ -f /usr/bin/ninja-ide ]
111111
then
112112
echo -e "$verde Ya esta$rojo Ninja IDE$verde instalado en el equipo, omitiendo paso$gris"
113113
else

Personalización_GTK.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,20 @@ function configurar_temas(){
6868
sudo dpkg -i Paper_Theme.deb && sudo apt install -f -y
6969
fi
7070

71-
if [ -f "./Flat-Plat-20170605/install.sh" ]
71+
# Instalar Flat-Plat
72+
if [ -f "./materia-theme-20170605/install.sh" ]
7273
then
7374
echo -e "$verde Ya esta$rojo Flat-Plat$verde descargado, omitiendo paso$gris"
7475
else
7576
REINTENTOS=5
7677
echo -e "$verde Descargando$rojo Flat-Plat$gris"
7778
for (( i=1; i<=$REINTENTOS; i++ ))
7879
do
79-
rm -r ./Flat-Plat-20170605 2>> /dev/null
80+
rm -r ./materia-theme-20170605 2>> /dev/null
8081
curl -sL https://github.com/nana-4/Flat-Plat/archive/v20170605.tar.gz | tar xz && break
8182
done
8283
echo -e "$verde Preparando para instalar$rojo Tema Flat-Plat$gris"
83-
sudo ./Flat-Plat-20170605/install.sh
84+
sudo ./materia-theme-20170605/install.sh #2>> /dev/null
8485
fi
8586

8687
#TODO → Establecer Flat-Plat como tema activos

0 commit comments

Comments
 (0)