Sha256: 273753840997574de1644d61ab4b2ffdd4002cec1df7e07563f53607bc6ec86a
Contents?: true
Size: 1018 Bytes
Versions: 13
Compression:
Stored size: 1018 Bytes
Contents
class Add < Array def update if(File.exists?('.git') && File.exists?('.gitignore')) add 'git add --all' else if(defined?(SOURCE)) if(File.exists?('.svn')) SOURCE.each{|f| if(File.exists?(f)) status=Command.output("svn status #{f}") if(status.include?('?') || status.include?('was not found')) puts "svn add #{f} --parents" add "svn add #{f} --parents" else puts "#{status}" if status.strip.length > 0 puts " #{f}" if status.strip.length == 0 end end } end if(File.exists?('.git')) SOURCE.each{|f| status=`git status #{f} --short` #if status.include?('untracked') || status.include?('modified:') if status.include?('??') || status.include?(' M ') puts "git add #{f} -v" add "git add #{f} -v" else puts status if status.strip.length > 0 end } end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems