Sha256: ce3a783d4409fea5cb8fc1d776ed13a2fbe3c37b9b120bd494fca554d5a7f241

Contents?: true

Size: 1.29 KB

Versions: 1

Compression:

Stored size: 1.29 KB

Contents

#!/usr/bin/env ruby

require 'reap/task'

#  ___           _        _ _   _____         _
# |_ _|_ __  ___| |_ __ _| | | |_   _|_ _ ___| | __
#  | || '_ \/ __| __/ _` | | |   | |/ _` / __| |/ /
#  | || | | \__ \ || (_| | | |   | | (_| \__ \   <
# |___|_| |_|___/\__\__,_|_|_|   |_|\__,_|___/_|\_\
#

class Reap::Install < Reap::Task

  task_desc "Locally install package using built-in setup.rb."

  task_help %{

    reap install

    This task manually installs a project using setup.rb.
    If setup.rb doesn't exist it will be created.

  }

  task_attr :ins

  def run

    ins.options ||= []

    #exe = %w{ setup.rb install.rb }.find{ |f| File.exists?(f) }
    #raise "setup.rb or install.rb not found" if exe == nil

    unless provide_setup_rb
      puts "Setup.rb is missing. Forced to skip debian package creation."
      return nil
    end

    puts "Reap is shelling out work to setup.rb..."

    #--
    # SHELL OUT! This will be fixed with swtich to package.rb instead of setup.rb.
    #++

    exe = %{ruby setup.rb}
    exe << ' -q ' unless $VERBOSE
    exe << ins.options.join(' ')
    exe << ' all'
    sh exe

    puts "Setup complete!"
  end

end


# Rake interface.

if defined?(Rake)

  #require 'reap/rake/adapter'

  module Rake
    ReapInstall = ::Reap::RakeAdapter( ::Reap::Install )
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
reap-5.0.0 lib/reap/task/install.rb