Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/chef
diff options
context:
space:
mode:
authorRaphael Sofaer <raphael@joindiaspora.com>2011-02-24 00:47:51 +0300
committerRaphael Sofaer <raphael@joindiaspora.com>2011-02-24 03:06:55 +0300
commit2c5fc1bdd948bbad17580e5b99e8252c80d1a65c (patch)
tree19737edfc967959601a5c0fdf7da9a6766328d1b /chef
parentd75bc10ac0939434205643572a7c0dbbcd887d29 (diff)
Add some idempotency stuff
Diffstat (limited to 'chef')
-rw-r--r--chef/cookbooks/centos/recipes/curl.rb22
1 files changed, 19 insertions, 3 deletions
diff --git a/chef/cookbooks/centos/recipes/curl.rb b/chef/cookbooks/centos/recipes/curl.rb
index 4435f74dd..d31488922 100644
--- a/chef/cookbooks/centos/recipes/curl.rb
+++ b/chef/cookbooks/centos/recipes/curl.rb
@@ -2,15 +2,31 @@ curl = 'curl-7.21.4'
execute 'download curl' do
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
execute "unzip curl" do
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"
+ #not_if do
+ # the libcurl so file is there
+ #end
+end
+
+execute "compile curl" do
command "cd /tmp/install/#{curl} && make"
+end
+
+execute "install curl" do
command "cd /tmp/install/#{curl} && make install"
- not_if "ls /usr/local/lib/libcurl.so.4"
end
execute 'update dynamic loader cache for curl' do
@@ -25,7 +41,7 @@ end
#execute 'add bundler line' do
# command "cd /usr/local/app/diaspora/ && bundle config build.typhoeus --with-curl=/usr/local/#{curl}/"
#end
-#
+
#execute 'rebundle' do
# command 'bundle install'
#end