]> code.delx.au - dotfiles/blob - install.sh
bashrc: find SSH keyring in more places
[dotfiles] / install.sh
1 #!/bin/bash
2
3 set -eu
4
5 cd "$HOME"
6
7 FILES=(
8 .bash_logout
9 .profile
10 .bash_profile
11 .bashrc
12 .gitconfig
13 .git-hooks-global
14 .gitignore-global
15 .inputrc
16 .pythonrc.py
17 .screenrc
18 .vimrc
19 )
20
21 if ! [ -d .dotfiles ]; then
22 git clone https://code.delx.au/dotfiles .dotfiles
23 fi
24
25 echo 'Removing...'
26 for f in "${FILES[@]}"; do
27 rm -f "$f" && echo " $f"
28 done
29
30 echo 'Installing...'
31 for f in "${FILES[@]}"; do
32 if [ -f "${HOME}/.dotfiles/$f" ]; then
33 echo " $f"
34 ln -s "${HOME}/.dotfiles/$f"
35 fi
36 done
37
38 echo 'Done!'