Sha256: 4395192a17de9129f02aa1a872744fbe2d928e1c7c3592ea7472f505bdd19f1b

Contents?: true

Size: 1.09 KB

Versions: 1

Compression:

Stored size: 1.09 KB

Contents

#!/usr/bin/env ruby

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

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

class Reap::Install < Reap::Task

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

  def init
    task.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(task.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.3 lib/reap/task/install.rb