Sha256: 9055d4fda703a066dd963e1a9984eae226843f02273f260dbcdc7a9754f75e45

Contents?: true

Size: 792 Bytes

Versions: 1

Compression:

Stored size: 792 Bytes

Contents

module Dev
module Cmd
class Setup < Array

  def refresh(dep_hash)
    puts_debug "Dev::Cmd::Setup.get_auto_setup_directives"
	strip_auto_entries
	# auto generate setup entry based on dep values
    dep_hash.each{ |k,v|
	  if !v.nil? && v.kind_of?(Hash)
        dep=Dev::Dep.new(v)
        dep.setup_commands.each{|cmd| self << cmd}
	  end
	}

	if(!Dir.glob("*.csproj").nil? && Dir.glob("*.csproj").length > 0)
      self << "{:cmd=>\"<%Dir.mkdir 'bin' unless File.exist?('bin')%>\", :auto=>true}"
      self << "{:cmd=>\"<%Dir.mkdir 'bin/Debug' unless File.exist?('bin/Debug')%>\", :auto=>true}"
      self << "{:cmd=>\"<%Dir.mkdir 'bin/Release' unless File.exist?('bin/Release')%>\", :auto=>true}"
    end
  end

end # class Setup
end # module Cmd
end # module Dev

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dev-1.0.154 lib/dev/cmd/Setup.rb