-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.sh
executable file
·44 lines (37 loc) · 1.25 KB
/
init.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
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# Link vimrc configuration
[ ! -f ~/.vimrc ] && { ln -s "${DIR}/.vimrc" ~; echo ".vimrc symlink created"; } || echo ".vimrc already exists"
# Link tmux configuration
[ ! -f ~/.tmux.conf ] && { ln -s "${DIR}/.tmux.conf" ~; echo ".tmux.conf symlink created"; } || echo ".tmux.conf already exists"
# Link shell configuration
if [ ! -f ~/.zshlocal ]; then
ln -s "${DIR}/.zshlocal" ~
echo "source ~/.zshlocal" >> ~/.zshrc
echo ".zshlocal symlink created"
else
echo ".zshlocal already exists"
fi
# Link pip configuration
if [ ! -f ~/.config/pip/pip.conf ]; then
mkdir -p ~/.config/pip
ln -s "${DIR}/pip.conf" ~/.config/pip
echo "pip.config symlink created"
else
echo "pip.conf already exists"
fi
# Link alacritty configuration
if [ ! -f ~/.config/alacritty/alacritty.yml ]; then
mkdir -p ~/.config/alacritty
ln -s "${DIR}/alacritty.yml" ~/.config/alacritty
echo "alacritty.yml symlink created"
else
echo "alacritty.yml already exists"
fi
# Link karabiner configuration
if [ ! -f ~/.config/karabiner/karabiner.json ]; then
ln -s "${DIR}/karabiner" ~/.config
echo "karabiner symlink created"
else
echo "karabiner already exists"
fi