Permalink
Browse files

a task to unpack the rabbitmq server

  • Loading branch information...
rick committed Nov 24, 2008
1 parent babaec8 commit 23bdd99b01eb1cff39b92d1aa8fc8465d19b4eae
Showing with 24 additions and 0 deletions.
  1. +24 −0 tasks/install_dependencies.rake
@@ -0,0 +1,24 @@
+require 'fileutils'
+
+here = File.dirname(__FILE__)
+vendor = File.expand_path(here + '/../vendor/')
+run = File.expand_path(here + '/../run/')
+
+desc 'install dependencies'
+task :install_dependencies => [ :install_rabbit_mq ] do
+ puts "Done."
+end
+
+desc 'install the RabbitMQ message server'
+task :install_rabbit_mq do
+ target = File.expand_path(run+'/rabbitmq')
+ if File.directory?(target)
+ puts "RabbitMQ already installed in [#{target}]"
+ else
+ puts "installing RabbitMQ in [#{target}]..."
+
+ tarball = vendor + '/rabbitmq-server*.tar.gz'
+ `cd #{run}; tar xfvz #{tarball}`
+ `cd #{run}; mv rabbitmq* rabbitmq`
+ end
+end

0 comments on commit 23bdd99

Please sign in to comment.