This repository was archived by the owner on Apr 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·56 lines (47 loc) · 1.29 KB
/
install
File metadata and controls
executable file
·56 lines (47 loc) · 1.29 KB
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
#!/bin/bash
set -eu
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 Julian Kardis (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
}
update_vimrc () {
if [[ -e "$HOME/.vim" ]]; then
rm -rf "$HOME/.vim"
fi
ln -snf "$HOME/.dotfiles/vim" "$HOME/.vim"
ln -snf "$HOME/.vim/vimrc" "$HOME/.vimrc"
if hash vim 2>/dev/null; then
vim +PlugInstall +qall
fi
}
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/importjs.js" "$HOME/.importjs.js"
ln -snf "$HOME/.dotfiles/ignore" "$HOME/.rgignore"
ln -snf "$HOME/.dotfiles/ignore" "$HOME/.fdignore"
}
main () {
update_bashrc
install_base16
update_git
update_vimrc
update_tmux_conf
update_others
}
main "$@"