forked from Valloric/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_dotfiles.sh
executable file
·110 lines (93 loc) · 2.41 KB
/
setup_dotfiles.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/bin/bash
# get the dir of the current script
script_dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
if [[ ! -a ~/.zshrc ]]
then
ln -s $script_dir/zsh/zshrc.zsh ~/.zshrc
fi
if [[ ! -a ~/.zshenv ]]
then
ln -s $script_dir/zsh/zshenv.zsh ~/.zshenv
fi
if [[ ! -a ~/.vimrc ]]
then
ln -s $script_dir/vim/vimrc.vim ~/.vimrc
fi
if [[ ! -a ~/.gdbrc ]]
then
ln -s $script_dir/misc/gdbrc ~/.gdbrc
fi
if [[ ! -a ~/.gradle/gradle.properties ]]
then
mkdir -p ~/.gradle
ln -s $script_dir/gradle/gradle.properties ~/.gradle/gradle.properties
fi
if [[ ! -a ~/.cgdb/cgdbrc ]]
then
mkdir -p ~/.cgdb
ln -s $script_dir/misc/cgdbrc ~/.cgdb/cgdbrc
fi
if [[ ! -a ~/.gitignore_global ]]
then
ln -s $script_dir/misc/gitignore_global ~/.gitignore_global
fi
if [[ ! -a ~/.config/terminator/config ]]
then
mkdir -p ~/.config/terminator
ln -s $script_dir/terminator/config ~/.config/terminator/config
fi
if [[ ! -a ~/.config/redshift.conf ]]
then
mkdir -p ~/.config
ln -s $script_dir/redshift/redshift.conf ~/.config/redshift.conf
fi
if [[ ! -a ~/.config/alacritty.yml ]]
then
mkdir -p ~/.config
ln -s $script_dir/alacritty/alacritty.yml ~/.config/alacritty.yml
fi
if [[ ! -a ~/.flake8rc ]]
then
ln -s $script_dir/misc/flake8rc ~/.flake8rc
fi
# -p says to create the dir if it doesn't exist already
mkdir -p $HOME/bin
if [[ ! -a ~/bin/git-wip-check ]]
then
ln -s $script_dir/bin/git-wip-check.sh ~/bin/git-wip-check
fi
# Naturally, macvim needs to be installed for this to work
if [[ $(uname) == *Darwin* ]]
then
# symlinks for mvim
if [[ -a ~/bin/mvim ]]
then
ln -s ~/bin/mvim ~/bin/gvimdiff
ln -s ~/bin/mvim ~/bin/vimdiff
ln -s ~/bin/mvim ~/bin/vim
ln -s ~/bin/mvim ~/bin/gvim
ln -s ~/bin/mvim ~/bin/vi
else
ln -s /usr/local/bin/mvim ~/bin/gvimdiff
ln -s /usr/local/bin/mvim ~/bin/vimdiff
ln -s /usr/local/bin/mvim ~/bin/vim
ln -s /usr/local/bin/mvim ~/bin/gvim
ln -s /usr/local/bin/mvim ~/bin/vi
fi
elif [[ -a ~/bin/vim ]]
then
ln -s ~/bin/vim ~/bin/gvim
ln -s ~/bin/vim ~/bin/vi
ln -s ~/bin/vim ~/bin/gvimdiff
ln -s ~/bin/vim ~/bin/vimdiff
ln -s ~/bin/vim ~/bin/view
fi
$script_dir/gitconfig_setup.sh
$script_dir/tmux/tmux_setup.sh
$script_dir/urxvt/urxvt_setup.sh
$script_dir/intellij/intellij_setup.sh
$script_dir/less/less_setup.sh
$script_dir/compton/compton_setup.sh
$script_dir/emacs/emacs_setup.sh
$script_dir/gpg/gpg_setup.sh
$script_dir/sublime-text/sublime_setup.sh