language: cpp
os:
  - osx  
  - linux
env:
  - NODE_VERSION="0.10"
    JULIA_VERSION="juliareleases" 
  - NODE_VERSION="0.10"
    JULIA_VERSION="julianightlies"
before_install:
  - if [ `uname` = "Linux" ]; then
      sudo add-apt-repository ppa:staticfloat/julia-deps -y;
      sudo add-apt-repository ppa:staticfloat/${JULIA_VERSION} -y;
      sudo apt-get update -qq -y;
      sudo apt-get install libpcre3-dev julia -y;
      nvm install $NODE_VERSION;
      node --version;
      npm install;
      npm install -g mocha;
      npm install -g node-gyp;
    elif [ `uname` = "Darwin" ]; then
       brew update;
       brew install nvm;
       nvm install $NODE_VERSION;
       node --version;
       npm install -g mocha chai sinon;
       npm install -g mocha;
       npm install -g node-gyp;
       if [ "$JULIA_VERSION" = "julianightlies" ]; then
         wget -O julia.dmg "http://status.julialang.org/download/osx10.7+";
       else
         wget -O julia.dmg "http://status.julialang.org/stable/osx10.7+";
       fi;
       hdiutil mount julia.dmg;
       cp -Ra /Volumea/Julia/*.app/julia ~;
       export PATH=$PATH:~/julia/bin;
    fi
script:
  - node-gyp rebuild
  - npm test

language: cpp
os:
  - osx  
  - linux
env:
  - NODE_VERSION="0.10"
    JULIA_VERSION="juliareleases" 
  - NODE_VERSION="0.10"
    JULIA_VERSION="julianightlies"
before_install:
  - if [ `uname` = "Linux" ]; then
      sudo add-apt-repository ppa:staticfloat/julia-deps -y;
      sudo add-apt-repository ppa:staticfloat/${JULIA_VERSION} -y;
      sudo apt-get update -qq -y;
      sudo apt-get install libpcre3-dev julia -y;
      nvm install $NODE_VERSION;
      npm install;
      npm install -g mocha;
      npm install -g node-gyp;
    elif [ `uname` = "Darwin" ]; then
       brew update;
       brew install nvm;
       . ~/.nvm/nvm.sh;
       nvm install $NODE_VERSION;
       npm install;
       npm install -g mocha;
       npm install -g node-gyp;
       if [ "$JULIA_VERSION" = "julianightlies" ]; then
         wget -O julia.dmg "http://status.julialang.org/download/osx10.7+";
       else
         wget -O julia.dmg "http://status.julialang.org/stable/osx10.7+";
       fi;
       hdiutil mount julia.dmg;
       cp -Ra /Volumea/Julia/*.app/Contents/Resources/julia ~;
       export PATH=$PATH:~/julia/bin;
    fi
  - node --version
script:
  - node-gyp rebuild
  - npm test

Fix for nvm and julia incorrect copy
Fix for nvm and julia incorrect copy
