Sha256: 1efc57e470cf45dccf0d0a3d31e7827dcd7a7734549866ef136af25d8bb83ebc

Contents?: true

Size: 930 Bytes

Versions: 7

Compression:

Stored size: 930 Bytes

Contents

Execute.define_task do
  desc 'dtach-install', 'Install dtach 0.8 from source'
  def dtach_install
    invoke :dtach_about
    
    unless windows?
      Dir.chdir('/tmp/')
      unless File.exists?('/tmp/dtach-0.8.tar.gz')
        require 'net/http'

        url = 'http://downloads.sourceforge.net/project/dtach/dtach/0.8/dtach-0.8.tar.gz'
        open('/tmp/dtach-0.8.tar.gz', 'wb') do |file| file.write(open(url).read) end
      end #do

      unless File.directory?('/tmp/dtach-0.8')
        system('tar xzf dtach-0.8.tar.gz')
      end #unless

      ENV['PREFIX'] and bin_dir = "#{ENV['PREFIX']}/bin" or bin_dir = "#{RedisRunner.prefix}bin"
      
      mk_bin_dir(bin_dir)
	    
      Dir.chdir('/tmp/dtach-0.8/')
      system 'cd /tmp/dtach-0.8/ && ./configure && make'
      system "cp /tmp/dtach-0.8/dtach #{bin_dir}"

      puts "Dtach successfully installed to #{bin_dir}"
    end #unless
  end #dtach_install
end #do

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rhoconnect-3.2.1 commands/commands/dtach_commands/dtach_install.rb
rhoconnect-3.2.0 commands/commands/dtach_commands/dtach_install.rb
rhoconnect-3.2.0.beta5 commands/commands/dtach_commands/dtach_install.rb
rhoconnect-3.2.0.beta4 commands/commands/dtach_commands/dtach_install.rb
rhoconnect-3.2.0.beta3 commands/commands/dtach_commands/dtach_install.rb
rhoconnect-3.2.0.beta2 commands/commands/dtach_commands/dtach_install.rb
rhoconnect-3.2.0.beta1 commands/commands/dtach_commands/dtach_install.rb