-
Notifications
You must be signed in to change notification settings - Fork 3
/
bootstrap.sh
executable file
·83 lines (68 loc) · 2.22 KB
/
bootstrap.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
# Run all commands from dotfiles.
cd "$(dirname "$0")"
# Use absolute paths.
DOTFILES_ROOT="$(pwd)"
# Make bash finicky.
set -e
source "$DOTFILES_ROOT/lib/logging.sh"
link () {
declare src="$1" dest="$2"
if [ -e "$dest" ]; then
if [ -h "$dest" ]; then
# Kill any existing links.
rm "$dest"
else
failure "$dest already exists and is not a link. Clean it up!"
fi
fi
ln -s "$src" "$dest"
success "Linked $src to $dest."
}
main () {
info "Let's get this party started!"
brew bundle --file $DOTFILES_ROOT/Brewfile
info "Boostrapping Zsh."
if [[ $SHELL == "/bin/zsh" ]]; then
success "zsh is available."
else
failure "Zsh is not your shell. Set with 'chsh -s /bin/zsh'."
fi
local omz="$HOME/.oh-my-zsh"
if [ -d "$omz" ]; then
success "Oh My Zsh is available."
else
git clone --depth=1 --quiet \
https://github.com/robbyrussell/oh-my-zsh.git "$omz"
success "Fetched Oh My Zsh."
fi
info "Make Zee Deerectories!"
local pip="$HOME/.pip"
if [ -d "$pip" ]; then
success "$pip exists."
else
mkdir -p "$pip"
success "Created $pip."
fi
info "Symlink ALL THE THINGS!"
link "$DOTFILES_ROOT/.bash_profile" "$HOME/.bash_profile"
link "$DOTFILES_ROOT/git/.gitconfig" "$HOME/.gitconfig"
link "$DOTFILES_ROOT/pip.conf" "$HOME/.pip/pip.conf"
link "$DOTFILES_ROOT/zsh/zshenv" "$HOME/.zshenv"
link "$DOTFILES_ROOT/zsh/zshrc" "$HOME/.zshrc"
mkdir -p "$HOME/.config"
link "$DOTFILES_ROOT/nvim" "$HOME/.config/nvim"
link "$DOTFILES_ROOT/starship.toml" "$HOME/.config/starship.toml"
info "Watch out for VPN issues!"
info "Install Neovim plugins."
nvim --headless +PlugInstall +q
# iTerm2 config
# Appearance > Tabs > Uncheck "Show activity indicator"
# Profiles > General > Radio "Reuse previous session's directory"
# Profiles > Colors > Color Presets... > Import and Use "Monokai Remastered"
# Profiles > Text > Font > Use "UbuntuMono Nerd Font Mono" at 14pt
# Profiles > Terminal > Check "Silence bell"
info "Check your iTerm2 configuration."
success "You're golden!"
}
main