-
Notifications
You must be signed in to change notification settings - Fork 8
/
bootstrap.sh
executable file
·59 lines (51 loc) · 1.11 KB
/
bootstrap.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
#!/usr/bin/env bash
mkdir -p ${XDG_CONFIG_HOME:=$HOME/.config}
# symlink dotfiles
files=(\
"bin"\
"curlrc"\
"cvimrc"\
"gitconfig"\
"hammerspoon"\
"ignore"\
"inputrc"\
"zshenv"\
)
for file in ${files[@]}; do
dest=${HOME}/.${file}
if [ -L ${dest} ]; then
echo "${dest} symlink already exists, skipping"
elif [ -f ${dest} ]; then
echo "${dest} is a file, skipping"
else
ln -s ~/.dotfiles/${file} ${dest}
fi
done
xdg_files=(\
"alacritty"\
"karabiner"\
"rg"\
"tmux"\
"vivid"\
"zsh"\
)
for file in ${xdg_files[@]}; do
dest=${XDG_CONFIG_HOME}/${file}
if [ -L ${dest} ]; then
echo "${dest} symlink already exists, skipping"
continue
elif [ -f ${dest} ]; then
echo "${dest} is a file, skipping"
elif [ -d ${dest} ]; then
echo "${dest} is a dir, skipping"
else
ln -s ~/.dotfiles/${file} $dest
fi
done
ln -s ~/.dotfiles/tmux/tmux.conf ~/.tmux.conf
mkdir -p ${XDG_CONFIG_HOME}/nvim
if [ -L ${XDG_CONFIG_HOME}/nvim/init.lua ]; then
echo "init.lua symlink already exists, skipping"
else
ln -s ~/.dotfiles/init.lua ${XDG_CONFIG_HOME}/nvim/init.lua
fi