-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall
executable file
·50 lines (41 loc) · 1.18 KB
/
install
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
#!/usr/bin/env bash
set -eux
update_bashrc () {
ln -snf "$HOME/.dotfiles/bash_profile" "$HOME/.bash_profile"
ln -snf "$HOME/.dotfiles/bashrc" "$HOME/.bashrc"
ln -snf "$HOME/.dotfiles/git-prompt-colors.sh" "$HOME/.git-prompt-colors.sh"
}
install_base16 () {
mkdir -p "$HOME/.config"
ln -snf "$HOME/.dotfiles/base16-shell" "$HOME/.config/base16-shell"
}
update_git () {
read -rp "Keep git user settings for Robbie Clarken (y/n)? " keep_git_user
ln -sf "$HOME/.dotfiles/git/gitconfig" "$HOME/.gitconfig"
if [[ "$keep_git_user" != "y" ]]; then
git config --global --remove-section user
fi
}
install_neovim_conf () {
mkdir -p "$HOME/.config"
ln -snf "$HOME/.dotfiles/nvim" "$HOME/.config/nvim"
}
update_tmux_conf () {
ln -snf "$HOME/.dotfiles/tmux" "$HOME/.tmux"
ln -snf "$HOME/.tmux/tmux.conf" "$HOME/.tmux.conf"
}
update_others () {
ln -snf "$HOME/.dotfiles/ctags" "$HOME/.ctags"
ln -snf "$HOME/.dotfiles/rgignore" "$HOME/.rgignore"
ln -snf "$HOME/.dotfiles/fdignore" "$HOME/.fdignore"
ln -snf "$HOME/.dotfiles/inputrc" "$HOME/.inputrc"
}
main () {
update_bashrc
install_base16
update_git
install_neovim_conf
update_tmux_conf
update_others
}
main "$@"