Sha256: 4d9e4a6fc7f8feef2d2590d413a9f13c8fe7d9ec40aef8006643473a27232da6

Contents?: true

Size: 909 Bytes

Versions: 1

Compression:

Stored size: 909 Bytes

Contents

#!/usr/bin/env ruby

require 'reap/task'
require 'reap/setup'

#
# Install Task
#
class Reap::Install < Reap::Task

  task_desc "Locally install package using setup.rb or install.rb."

  attr_accessor :options #, :sudo

  def init
    @options ||= []
    #@sudo   ||= true
  end

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

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

    # prepare for using internalized setup.rb

    ARGV.delete('install')
    ARGV << '-q' unless $VERBOSE
    ARGV.concat(options)

    $setup_pwd = $PROJECT_INFO.info_dir #Dir.pwd

    # invoke setup.rb

    begin
      ToplevelInstaller.invoke
    rescue SetupError
      raise if $DEBUG
      $stderr.puts $!.message
      $stderr.puts "Try 'reap --help' for detailed usage."
      exit 1
    end

    puts "Setup complete!"
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

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