forked from daveyarwood/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap_macos.sh
executable file
·92 lines (74 loc) · 1.82 KB
/
bootstrap_macos.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
84
85
86
87
88
89
90
91
92
#!/usr/bin/env bash
set -eo pipefail
# PSA: This is basically unmaintained since 2017, when I switched back to Linux.
#
# It's unlikely that I'll ever boostrap another Mac for software development,
# but if I ever do, I should revisit what this script does, compare it to what
# bootstrap_ubuntu.sh does, and make updates.
install_homebrew() {
echo Installing Homebrew...
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
}
install_git() {
# git should already be installed;
# running git for the first time will install xcode cli tools if needed
git
}
install_fish_shell() {
echo Installing fish shell...
brew install fish
echo Making fish the default shell...
# This part is probably Linux specific.
# which fish | sudo tee -a /etc/shells
chsh -s "$(which fish)"
}
install_jenv() {
brew install jenv
}
install_rbenv() {
brew install rbenv
}
install_hub() {
brew install hub
}
install_dotfiles() {
# my dotfiles rely on $CODEDIR being set already, which may not be the case,
# so we need to set them here if they aren't set
if [[ -z $CODEDIR ]]; then
export CODEDIR=$HOME/Code
fi
git clone https://github.com/daveyarwood/dotfiles.git "$HOME/.dotfiles"
cd .dotfiles
./install
}
install_neovim() {
brew install neovim/neovim/neovim
}
install_vim-plug() {
curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
vim +PlugInstall +qall
}
install_ack() {
brew install ack
}
install_tmux() {
brew install tmux
}
install_ag() {
brew install the_silver_searcher
}
install_homebrew
install_git
install_curl
install_ack
install_ag
install_tmux
install_fish_shell
install_jenv
install_rbenv
install_hub
install_dotfiles
install_neovim
install_vim-plug
echo "Done!"