diff options
| author | Jon Newson <jon_newson@ieee.org> | 2016-02-29 10:11:08 +1100 | 
|---|---|---|
| committer | Jon Newson <jon_newson@ieee.org> | 2016-02-29 10:11:08 +1100 | 
| commit | 739e5df4094e4965241762bc3579d3ad6cebe0ce (patch) | |
| tree | 32347726016aab98dc36c24b9b313bbedb9eb4c4 /osx_setup.sh | |
| parent | 7c9e10431ac098b54c0d30c00dd501aef3691c02 (diff) | |
#624 - Modify changes and apply suggested style.
Get current running shell and determine .rc file accordingly.
Diffstat (limited to 'osx_setup.sh')
| -rw-r--r--[-rwxr-xr-x] | osx_setup.sh | 29 | 
1 files changed, 6 insertions, 23 deletions
| diff --git a/osx_setup.sh b/osx_setup.sh index e90ae5f8..a8a37833 100755..100644 --- a/osx_setup.sh +++ b/osx_setup.sh @@ -1,21 +1,5 @@ -#!/usr/bin/env bash +#!/bin/bash -# Test to make sure we are OSX -if [ `/usr/bin/env | grep system_name | awk -F= '{print $2}'` != 'OSX' ] -	then -		exit $? -fi - -# Read the shell configured for the user and set the variable file accordingly -if [ `dscl . read ~ UserShell | grep -c bash` -eq 1 ] -	then  -		usershellvars='~/.bash_profile' -elif [ `dscl . read ~ UserShell | grep -c zsh` -eq 1 ] -	then -		usershellvars='~/.zshrc' - -fi -	  function install_compass {      rbenv install -s 2.2.3      eval "$(rbenv init -)" @@ -23,8 +7,8 @@ function install_compass {      rbenv local 2.2.3      gem install compass      export PATH=$PATH:~/.rbenv/versions/2.2.3/bin -    echo "export PATH=$PATH:~/.rbenv/versions/2.2.3/bin" >> $usershellvars -    echo 'eval "$(rbenv init -)"' >> $usershellvars +    echo "export PATH=$PATH:~/.rbenv/versions/2.2.3/bin" >> ~/.bash_profile +    echo 'eval "$(rbenv init -)"' >> ~/.bash_profile  }  function install_rbenv { @@ -46,11 +30,10 @@ function clone_repo {        cd pixelated-user-agent      fi  } -  #setup frontend -		install_rbenv -		install_compass -		install_npm +install_rbenv +install_compass +install_npm  #setup backend  brew install python # force brew install even if python is already installed | 
