-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
executable file
·52 lines (39 loc) · 1.55 KB
/
install
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
#!/bin/zsh
echo "Setting up your Mac..."
# Check for Homebrew and install if we don't have it
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Add homebrew to shell
eval "$(/opt/homebrew/bin/brew shellenv)"
# Update Homebrew recipes
brew update
# Install all our dependencies with bundle (See Brewfile)
brew tap homebrew/bundle
brew bundle
# Create a Sites directory
# This is a default directory for macOS user accounts but doesn't comes pre-installed
mkdir $HOME/Sites
# Removes .zshrc from $HOME (if it exists) and symlinks the .zshrc file from the .dotfiles
rm -rf $HOME/.zshrc
ln -s $HOME/.dotfiles/.zshrc $HOME/.zshrc
# Symlink git config file
ln -s $HOME/.dotfiles/.gitconfig $HOME/.gitconfig
# Add Golang folders
mkdir $HOME/go
go get golang.org/x/tools/cmd/godoc
go get github.com/golang/lint/golint
# Add Docker Desktop ZSH completion
# docker_etc=/Applications/Docker.app/Contents/Resources/etc
# ln -s $docker_etc/docker.zsh-completion /usr/local/share/zsh/site-functions/_docker
# ln -s $docker_etc/docker-machine.zsh-completion /usr/local/share/zsh/site-functions/_docker-machine
# ln -s $docker_etc/docker-compose.zsh-completion /usr/local/share/zsh/site-functions/_docker-compose
# 1Password SSH agent
mkdir -p $HOME/.ssh
cat >> $HOME/.ssh/config <<EOF
Host *
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
EOF
# Docker buildx
mkdir -p ~/.docker/cli-plugins
ln -sfn $(which docker-buildx) ~/.docker/cli-plugins/docker-buildx
# Set macOS preferences - reloads shell
source .macos