├── files └── ubuntu │ └── gvm.sh └── recipes └── default.rb /files/ubuntu/gvm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | [[ -s "$HOME/.gvm/scripts/gvm" ]] && . "$HOME/.gvm/scripts/gvm" 4 | -------------------------------------------------------------------------------- /recipes/default.rb: -------------------------------------------------------------------------------- 1 | # 2 | # Cookbook Name:: gvm 3 | # Recipe:: default 4 | # 5 | # Copyright 2012, Michael S. Klishin, Travis CI Development Team 6 | # 7 | # Licensed under the Apache License, Version 2.0 (the "License"); 8 | # you may not use this file except in compliance with the License. 9 | # You may obtain a copy of the License at 10 | # 11 | # http://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, software 14 | # distributed under the License is distributed on an "AS IS" BASIS, 15 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | # See the License for the specific language governing permissions and 17 | # limitations under the License. 18 | # 19 | 20 | include_recipe "build-essential" 21 | include_recipe "mercurial" 22 | include_recipe "git" 23 | 24 | package "curl" do 25 | action :install 26 | end 27 | 28 | bash "install GVM" do 29 | user node.travis_build_environment.user 30 | cwd node.travis_build_environment.home 31 | environment Hash['HOME' => node.travis_build_environment.home, 'gvm_user_install_flag' => '1'] 32 | code <<-SH 33 | curl -s https://raw.github.com/moovweb/gvm/master/binscripts/gvm-installer -o /tmp/gvm-installer && 34 | bash /tmp/gvm-installer 35 | rm /tmp/gvm-installer 36 | SH 37 | not_if "test -f #{node.travis_build_environment.home}/.gvm/scripts/gvm" 38 | end 39 | 40 | cookbook_file "/etc/profile.d/gvm.sh" do 41 | owner node.travis_build_environment.user 42 | group node.travis_build_environment.group 43 | mode 0755 44 | end 45 | --------------------------------------------------------------------------------