-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlinks.sh
executable file
·54 lines (34 loc) · 1.12 KB
/
links.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
#!/bin/bash
set -o noclobber
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
## Vim/Neovim ##
mkdir -p ~/.config
ln -sh "${SCRIPT_DIR}/nvim" ~/.config/nvim
ln -sh "${SCRIPT_DIR}/vim" ~/.vim
ln -sh "${SCRIPT_DIR}/vimrc" ~/.vimrc
ln -sh "${SCRIPT_DIR}/ideavimrc" ~/.ideavimrc
## Zshrc ##
# We have copy a blank zshrc down when one doesn't exist and source in the main
# one as a lot of local junk gets copied in there.
if [ ! -f ~/.zshrc ] ; then
cp "${SCRIPT_DIR}/zshrc.default" ~/.zshrc
fi
ln -sh "${SCRIPT_DIR}/zshrc.main" ~/.zshrc.main
if [ ! -f ~/.env ] ; then
cp "${SCRIPT_DIR}/env.default" ~/.env
fi
ln -sh "${SCRIPT_DIR}/env.main" ~/.env.main
## Git ##
ln -sh "${SCRIPT_DIR}/gitconfig" ~/.gitconfig
ln -sh "${SCRIPT_DIR}/gitignore.global" ~/.gitignore.global
## SSH ##
mkdir -p ~/.ssh
if [ ! -f ~/.ssh/config ]; then
cp "${SCRIPT_DIR}/ssh/config.default" ~/.ssh/config
fi
if [ ! -d ~/.ssh/config.d ]; then
cp -r "${SCRIPT_DIR}/ssh/config.d.default" ~/.ssh/config.d
fi
## Other ##
ln -sh "${SCRIPT_DIR}/phoenix.js" ~/.phoenix.js
ln -sh "${SCRIPT_DIR}/ripgreprc" ~/.ripgreprc