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