-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·30 lines (26 loc) · 983 Bytes
/
install.sh
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
#!/bin/bash
THISDIR=$(dirname $(readlink -f $0))
function dotfile {
origen=$1
destino=$2
echo "#-----------------------------------------"
echo "# $destino"
echo "#-----------------------------------------"
WARNING="" && [ -f "$destino" ] && WARNING="El actual se sobreescribira!"
read -p "Instalar $origen en $destino? $WARNING (s/N) " yn
if [[ $yn =~ ^[YySs]$ ]]; then
echo ">> $destino - Creando link de $origen a $destino..."
ln -sf $origen $destino
else
echo ">> $destino - no se ha cambiado"
fi
}
dotfile "$THISDIR/vimrc" "$HOME/.vimrc"
dotfile "$THISDIR/bashrc" "$HOME/.bashrc"
dotfile "$THISDIR/tmux.conf" "$HOME/.tmux.conf"
which xbindkeys > /dev/null || echo "Ojo: xbindkeys no instalado"
dotfile "$THISDIR/xbindkeysrc" "$HOME/.xbindkeysrc"
dotfile "$THISDIR/bin/move2tile.sh" "$HOME/bin/move2tile.sh"
dotfile "$THISDIR/bin/teclado.sh" "$HOME/bin/teclado.sh"
which vifm > /dev/null || echo "Ojo: vifm no instalado"
dotfile "$THISDIR/vifm" "$HOME/.vifm"