-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathosx-dev-machine-setup.sh
More file actions
executable file
·60 lines (49 loc) · 1.55 KB
/
osx-dev-machine-setup.sh
File metadata and controls
executable file
·60 lines (49 loc) · 1.55 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
#!/bin/bash -eux
# Install Xcode and Xcode Command Line Tools
xcode-select --install
# Install Brew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap homebrew/binary
brew update
# Install git
brew install git
echo -n "Enter your full name for git and press [ENTER]: "
read fullname
echo -n "Enter your email address for git and press [ENTER]: "
read emailaddress
git config --global user.name "$fullname"
git config --global user.email "$emailaddress"
# Install dsh
brew install dsh
mkdir -p ~/.dsh/groups
# Install awscli
sudo pip install awscli
mkdir -p ~/.aws
echo "[default]" >> ~/.aws/config
echo "region=us-west-1" >> ~/.aws/config
echo "output=json" >> ~/.aws/config
# Install Virtualbox
cd ~/Downloads/
curl -L -O http://download.virtualbox.org/virtualbox/4.3.12/VirtualBox-4.3.12-93733-OSX.dmg
hdiutil attach VirtualBox-*.dmg
sudo installer -pkg /Volumes/VirtualBox/VirtualBox.pkg -target /
hdiutil detach /Volumes/VirtualBox
# Install Vagrant
curl -L -O https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.3.dmg
hdiutil attach vagrant_*.dmg
sudo installer -pkg /Volumes/Vagrant/Vagrant.pkg -target /
hdiutil detach /Volumes/Vagrant
# Install Packer
brew install packer
# Setup local srv folder
if [[ ! -f /srv ]]; then
sudo mkdir /srv
fi
sudo chown -R `eval whoami` /srv
cd /srv
# Create id_rsa key if needed
if [[ ! -f $HOME/.ssh/id_rsa ]]; then
ssh-keygen -t rsa -C "$emailaddress"
chmod 600 $HOME/.ssh/id_rsa
fi
cat ~/.ssh/id_rsa.pub | mail -s "$HOSTNAME `whoami` $emailaddress public key" mcupples@cloudspace.com