-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
24 lines (18 loc) · 853 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
#!/bin/bash
DOTS=('bashrc' 'bash_alias' 'bash_function' 'bash_profile' 'cshrc' 'inputrc' 'vimrc' 'gitconfig' 'gitignore')
for DOT in ${DOTS[@]}; do
[ -L "${HOME}/.${DOT}" ] && (unlink "${HOME}/.${DOT}")
[ -f "${HOME}/.${DOT}" ] && (mv "${HOME}/.${DOT}" "${HOME}/${DOT}.bak")
ln -s "${HOME}/.dotfiles/${DOT}" "${HOME}/.${DOT}"
done
DOTDIRS=('vim' 'bc')
for DOTDIR in ${DOTDIRS[@]}; do
[ -L "${HOME}/.${DOTDIR}" ] && (unlink "${HOME}/.${DOTDIR}")
[ -d "${HOME}/.${DOTDIR}" ] && (mv "${HOME}/.${DOTDIR}" "${HOME}/${DOTDIR}.bak")
ln -s "${HOME}/.dotfiles/${DOTDIR}" "${HOME}/.${DOTDIR}"
done
# TODO mkdir -p ~/.cache/vim/{swap,backup,undo}
# TODO copy the git prompt and completion files from the installed ones and stop
# tracking
# special case
ln -s "${HOME}/.dotfiles/user-config.jam" "${HOME}/user-config.jam"