fix travis script to avoid idempotency problem
@@ -11,15 +11,16 @@ before_install:
before_script:
- "export CRUBY_VERSION=$(ruby -e'puts `grep cruby_version .mrubycconfig`.sub(\"cruby_version: \", \"\")')"
- export MRUBY_VERSION=$(grep mruby .ruby-version)
- - if [ ! -e src/hal ]; then ln -s hal_posix src/hal; fi
- - if [ ! -d ~/.rbenv; ]; then git clone https://github.com/rbenv/rbenv.git ~/.rbenv; fi
- - if [ ! -d ~/.rbenv/plugins/ruby-build; ]; then git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build; fi
+ - if [ ! -e ~/.rbenv/bin/rbenv ]; then git clone https://github.com/rbenv/rbenv.git ~/.rbenv; fi
+ - if [ ! -e ~/.rbenv/plugins/ruby-build/bin/ruby-build ]; then git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build; fi
+ - cd ~/.rbenv/plugins/ruby-build && git pull && cd -
- echo 'export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
- source ~/.bash_profile
+ - echo $PATH
- rbenv init -
- - rbenv install --skip-existing $CRUBY_VERSION
- rbenv install --skip-existing $MRUBY_VERSION
- - RBENV_VERSION=$CRUBY_VERSION gem install bundler:2.0.1
+ - rbenv install --skip-existing $CRUBY_VERSION
+ - RBENV_VERSION=$CRUBY_VERSION gem install bundler
- RBENV_VERSION=$CRUBY_VERSION bundle install
script:
