-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
32 lines (24 loc) · 818 Bytes
/
install.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
#!/bin/sh
echo "Setting up your Mac..."
# Check for Homebrew and install it if we don't have it
if test ! $(which brew); then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Update Homebrew recipes
brew update
# Install Homebrew dependencies with bundle
brew tap homebrew/bundle
brew bundle
# Remove dotfiles locally and setup symlinks
DIR=$HOME/.dotfiles
DOTFILES=(
".zshrc"
".gitconfig"
)
for dotfile in "${DOTFILES[@]}";do
rm -rf "${HOME}/${dotfile}"
ln -sf "${DIR}/${dotfile}" "${HOME}/${dotfile}"
done
# Special case symlink for settings.json becuase of the local file path
rm -rf $HOME/Library/Application\ Support/Code/User/settings.json
ln -s $HOME/.dotfiles/settings.json $HOME/Library/Application\ Support/Code/User/settings.json