-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbootstrap
More file actions
executable file
·62 lines (51 loc) · 1.59 KB
/
bootstrap
File metadata and controls
executable file
·62 lines (51 loc) · 1.59 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
57
58
59
60
61
62
#!/bin/zsh
# move ourselves into the scripts directory
canonical="$PWD"
# Defaults
ZSH_PATH=/usr/local/bin/zsh
# Try and install xcode if necessary
if xcode-select -p &> /dev/null
then
print "XCode CLI tools already installed, skipping"
else
print "Installing XCode CLI..."
xcode-select --install
fi
# Install homebrew, and check the path
if command -v brew &> /dev/null
then
print "Homebrew already installed, cleaning..."
brew uninstall --force `brew list`
else
print "Installing Homebrew"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
fi
# Install Homebrew packages
brew tap Homebrew/bundle
brew bundle
# Set up zsh
if ! grep "$ZSH_PATH" /etc/shells &> /dev/null
then
print "Appending zsh [$ZSH_PATH] to approved shell list (Password Required)..."
printf "/usr/local/bin/zsh" | sudo tee -a /etc/shells &> /dev/null
fi
if [ $SHELL != $ZSH_PATH ]
then
print "Setting Homebrew zsh [$ZSH_PATH] to default shell (Password Required)..."
chsh -u $USER -s $ZSH_PATH
fi
print "Linking dotfiles..."
echo $HOME
ln -sf $canonical/dotfiles/gitconfig $HOME/.gitconfig
ln -sf $canonical/dotfiles/vim $HOME/.vim
ln -sf $canonical/dotfiles/vimrc $HOME/.vimrc
ln -sf $canonical/dotfiles/vimrc.bundles $HOME/.vimrc.bundles
ln -sf $canonical/dotfiles/zshrc $HOME/.zshrc
ln -sf $canonical/dotfiles/zsh $HOME/.zsh
# Set up vim
# print "Generating neobundle..."
# curl https://raw.githubusercontent.com/Shougo/neobundle.vim/master/bin/install.sh | sh
vim +NeoBundleInstall +qall
# Open the best terminal in the world
open /Applications/iTerm.app