-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·77 lines (59 loc) · 2.14 KB
/
setup.sh
File metadata and controls
executable file
·77 lines (59 loc) · 2.14 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Stop if something fails
set -e
# /usr/local/bin doesn't exist on a fresh install
if [ ! -d "/usr/local/bin" ]; then
sudo mkdir -p /usr/local/bin
fi
# Install the latest stable nave the node.js environment switcher Node.js
sudo sh -c 'curl -fsSL https://raw.github.com/isaacs/nave/master/nave.sh > /usr/local/bin/nave && chmod ugo+x /usr/local/bin/nave'
# Install a global node.js
sudo nave usemain stable
# Is xcode needed?
if [ -x "$(xcode-select --print-path)" ]; then
echo Skipping xcode
else
echo Installing Xcode CLI tools
# Download and Install Command Line Tools for Xcode - https://developer.apple.com/downloads/download.action?path=Developer_Tools/command_line_tools_os_x_mountain_lion_for_xcode__april_2013/xcode462_cltools_10_86938259a.dmg
curl -O https://dl.dropboxusercontent.com/u/4119997/Setup/xcode462_cltools_10_86938259a.dmg && open xcode462_cltools_10_86938259a.dmg
# Install Xcode
# https://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12
echo "Press enter once Command Line Tools for Xcode are installed"
read
fi
# Accept the Xcode licence
sudo xcodebuild -license
# Is brew needed?
if [ -x "$(which brew)" ]; then
echo Skipping brew
else
echo Installing brew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Is MongoDB needed?
if [ -x "$(which mongo)" ]; then
echo Skipping MongoDB
else
echo Installing MongoDB
brew install mongo
if [ ! -d ~/Library/LaunchAgents ]; then
mkdir -p ~/Library/LaunchAgents
fi
# Launch mongo on startup
ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
# Start mongo now
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
fi
# Install ZeroMQ
brew install pkg-config
brew install zeromq
# Install zsh and oh-my-zsh
if [ -x "$(which zsh)" ]; then
brew install zsh
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
fi
# Install a bunch of useful tools
brew install wget mtr iftop pv tmux htop-osx hub
# memcached is required for development on some projects
brew install memcached
# Python is required to build some node libs
brew install python python3