-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
44 lines (38 loc) · 1010 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
#
# TODO:
# * check if symlink already exists
# * drop symlink naming?
# * notice when files added and error out? would have to keep symlink notation...
#
set -e
base=~/.dotfiles
home-link() {
local src=${base}/${1}
local default_dst=~/.$(basename ${1} .symlink)
local dst=${2:-$default_dst}
echo "linking $src to $dst"
[[ -L $dst ]] && rm $dst
if [[ -e $dst ]]; then
echo "warning - removing original $dst"
rm -r $dst
fi
ln -s $src $dst
}
# Link .ssh first so that password only require once
home-link ssh.symlink ~/.ssh
chmod g-w ~/.dotfiles/ssh.symlink
home-link config.symlink ~/.config
home-link vim/vim.symlink ~/.vim
home-link dircolors.symlink
home-link git/gitconfig.symlink
home-link git/gitconfig.beyond.symlink
home-link git/gitignore.symlink
home-link inputrc.symlink
home-link ipython.symlink
home-link pdbrc.symlink
home-link psqlrc.symlink
home-link pythonrc.symlink
home-link tmux.conf.symlink
home-link vim/vimrc.symlink
home-link profile.symlink