-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·42 lines (31 loc) · 946 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
#!/usr/bin/env bash
set -e
dotfiles_dir=~/code/dotfiles
set_and_backup_file() {
local directory=$1
local filename=$2
if [[ ! -z "$directory" ]]; then
mkdir -p ~/$directory
filename=$directory/$filename
fi
if test -f ~/$filename; then
mv ~/$filename ~/$filename.bk
echo "~/$filename.bk created"
fi
ln -sf $dotfiles_dir/$filename ~/$filename
echo "~/$filename symlinked"
}
echo '== Symlinking files in' $dotfiles_dir ' =='
# Symlink config files
set_and_backup_file "" .dev_env_rc
set_and_backup_file "" .samrc
set_and_backup_file "" .gitconfig
set_and_backup_file "" .vimrc
set_and_backup_file .config/Code/User keybindings.json
set_and_backup_file .config/Code/User settings.json
set_and_backup_file .config/mpv mpv.conf
# Setup tmux
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
set_and_backup_file "" .tmux.conf
echo '== Setup zsh =='
echo 'see https://github.com/lytefast/prezto'