-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·48 lines (40 loc) · 998 Bytes
/
setup.sh
File metadata and controls
executable file
·48 lines (40 loc) · 998 Bytes
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
#!/usr/bin/env bash
set -eo pipefail
function ensure_brew_exists {
echo "ensuring brew exists"
if [[ ! -x /usr/local/bin/brew ]] ; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
}
function update_brew_bundle {
echo "updating brew bundle"
brew update
if [ -f '/usr/local/bin/gpg-agent' ]; then
rm /usr/local/bin/gpg-agent
fi
set +e
brew bundle -v
set -e
}
function install_oh_my_zsh {
echo "installing oh my zsh"
if [ -d ~/.oh-my-zsh ]; then
echo "oh my zsh already installed 👍"
else
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
}
function move_dot_files {
echo "symlinking dot files to home"
ln -s ~/setup/.aliases ~/.aliases
ln -s ~/setup/.gitconfig ~/.gitconfig
ln -s ~/setup/.zshrc ~/.zshrc
}
function main {
ensure_brew_exists
install_oh_my_zsh
update_brew_bundle
move_dot_files
echo "All done 🥳"
}
main