Add some idempotency stuff
This commit is contained in:
parent
d75bc10ac0
commit
2c5fc1bdd9
1 changed files with 19 additions and 3 deletions
|
|
@ -2,15 +2,31 @@ curl = 'curl-7.21.4'
|
||||||
|
|
||||||
execute 'download curl' do
|
execute 'download curl' do
|
||||||
command "mkdir -p /tmp/install && wget http://curl.download.nextag.com/download/#{curl}.tar.gz"
|
command "mkdir -p /tmp/install && wget http://curl.download.nextag.com/download/#{curl}.tar.gz"
|
||||||
not_if "ls /tmp/install/#{curl}.tar.gz"
|
not_if do
|
||||||
|
File.exists?("/tmp/install/#{curl}.tar.gz")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
execute "unzip curl" do
|
execute "unzip curl" do
|
||||||
command "cd /tmp/install && tar -xvf #{curl}.tar.gz"
|
command "cd /tmp/install && tar -xvf #{curl}.tar.gz"
|
||||||
|
not_if do
|
||||||
|
File.exists?("/tmp/install/#{curl}/README")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
execute "configure curl" do
|
||||||
command "cd /tmp/install/#{curl} && ./configure --with-ssl"
|
command "cd /tmp/install/#{curl} && ./configure --with-ssl"
|
||||||
|
#not_if do
|
||||||
|
# the libcurl so file is there
|
||||||
|
#end
|
||||||
|
end
|
||||||
|
|
||||||
|
execute "compile curl" do
|
||||||
command "cd /tmp/install/#{curl} && make"
|
command "cd /tmp/install/#{curl} && make"
|
||||||
|
end
|
||||||
|
|
||||||
|
execute "install curl" do
|
||||||
command "cd /tmp/install/#{curl} && make install"
|
command "cd /tmp/install/#{curl} && make install"
|
||||||
not_if "ls /usr/local/lib/libcurl.so.4"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
execute 'update dynamic loader cache for curl' do
|
execute 'update dynamic loader cache for curl' do
|
||||||
|
|
@ -25,7 +41,7 @@ end
|
||||||
#execute 'add bundler line' do
|
#execute 'add bundler line' do
|
||||||
# command "cd /usr/local/app/diaspora/ && bundle config build.typhoeus --with-curl=/usr/local/#{curl}/"
|
# command "cd /usr/local/app/diaspora/ && bundle config build.typhoeus --with-curl=/usr/local/#{curl}/"
|
||||||
#end
|
#end
|
||||||
#
|
|
||||||
#execute 'rebundle' do
|
#execute 'rebundle' do
|
||||||
# command 'bundle install'
|
# command 'bundle install'
|
||||||
#end
|
#end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue