Sha256: a58e6f6a8b3256711794f04f9eee7005d1413cb0b202521bbea2ef5173a581af

Contents?: true

Size: 1.01 KB

Versions: 3

Compression:

Stored size: 1.01 KB

Contents

Execute.define_task do
desc "redis-install", 'Install the latest verison of Redis from Github (requires git, duh)'
  def redis_install
    invoke :redis_about
    invoke :redis_download
    invoke :redis_make
    unless windows?
        ENV['PREFIX'] and bin_dir = "#{ENV['PREFIX']}/bin" or bin_dir = "#{RedisRunner.prefix}bin"
        
        mk_bin_dir(bin_dir)
        
        %w(redis-benchmark redis-cli redis-server).each do |bin|
          sh "cp /tmp/redis/src/#{bin} #{bin_dir}"
        end #do
    
        puts "Installed redis-benchmark, redis-cli and redis-server to #{bin_dir}"
    
        ENV['PREFIX'] and conf_dir = "#{ENV['PREFIX']}/etc" or conf_dir = "#{RedisRunner.prefix}etc"
        unless File.exists?("#{conf_dir}/redis.conf")
          sh "mkdir #{conf_dir}" unless File.exists?("#{conf_dir}")
          sh "cp /tmp/redis/redis.conf #{conf_dir}/redis.conf"
          puts "Installed redis.conf to #{conf_dir} \n You should look at this file!"
        end #unless
    end #unless
  end #redis_install
end #do

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rhoconnect-3.2.0.beta3 commands/commands/redis_commands/redis_install.rb
rhoconnect-3.2.0.beta2 commands/commands/redis_commands/redis_install.rb
rhoconnect-3.2.0.beta1 commands/commands/redis_commands/redis_install.rb