diff options
author | NavaL <ayoyo@thoughtworks.com> | 2016-02-09 13:41:21 +0100 |
---|---|---|
committer | NavaL <ayoyo@thoughtworks.com> | 2016-02-09 13:41:57 +0100 |
commit | b7943d436702c2bf6551ccceded94eff8638eae1 (patch) | |
tree | 2e58367cda46bf90b34a9cda4e2526c641227384 /osx_setup.sh | |
parent | 1716d0f65d42451d7fe5fe761703e7c733533733 (diff) |
adding OSX setup
Issue #593
Diffstat (limited to 'osx_setup.sh')
-rw-r--r-- | osx_setup.sh | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/osx_setup.sh b/osx_setup.sh new file mode 100644 index 00000000..9f533128 --- /dev/null +++ b/osx_setup.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +function install_compass { + rbenv install -s 2.2.3 + eval "$(rbenv init -)" + rbenv shell 2.2.3 + rbenv local 2.2.3 + gem install compass + export PATH=$PATH:~/.rbenv/versions/2.2.3/bin +} + +function install_rbenv { + hash rbenv 2>/dev/null || brew install rbenv ruby-build +} + +function install_npm { + hash node 2>/dev/null || brew install npm +} + +function clone_repo { + if [ -d ./pixelated-user-agent ] + then + cd pixelated-user-agent + /usr/bin/git pull --rebase + rm -rf web-ui/node_modules + else + /usr/bin/git clone https://github.com/pixelated/pixelated-user-agent.git + cd pixelated-user-agent + fi +} +#setup frontend +install_rbenv +install_compass +install_npm + +#setup backend +brew install python # force brew install even if python is already install +export LDFLAGS=-L/usr/local/opt/openssl/lib +export LDFLAGS=-L/usr/local/opt/openssl/lib +pip install virtualenv +virtualenv ~/.virtualenvs/pixelated-venv +source ~/.virtualenvs/pixelated-venv/bin/activate + +# install +clone_repo +cd service && ./go setup +source ~/.virtualenvs/pixelated-venv/bin/activate |