Sha256: 0e2c19c8bfe206eb4264d95725c1c1e353d4055099096d371b0f31ae14c28c9c

Contents?: true

Size: 1.37 KB

Versions: 1

Compression:

Stored size: 1.37 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

    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..."

#     # 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

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

    puts "Setup complete!"
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

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