We Recommend

CSS: The Definitive Guide CSS: The Definitive Guide
Provides you with a comprehensive guide to CSS implementation, along with a thorough review of all aspects of CSS 2.1. Updated to cover Internet Explorer 7, Microsoft's vastly improved browser, this new edition includes content on positioning, text wrapping (nowrap), lists and generated content, table layout, user interface, paged media, and more.


Posted By

thebugslayer on 09/23/07


Tagged

svn groovy


Versions (?)


svnadd.groovy Add all svn new status files to working directory


Published in: Groovy 


  1. #!/usr/bin/env groovy
  2.  
  3. // Add all new files in working dir into svn
  4. // Usage svnadd.groovy [working_dir]
  5. def wd = args.size()>0 ? args[0] : '.'
  6. def svnStatusCmd = "svn st $wd"
  7. def svnAddCmd = "svn add "
  8.  
  9. svnStatusCmd.execute().text.split("\n").each{ line ->
  10. matcher = (line =~ /^\?\s+(.+)$/)
  11. if(matcher.find()){
  12. def file = matcher.group(1)
  13. def cmd = svnAddCmd + " " + file
  14. print cmd.execute().text
  15. }
  16. }

Report this snippet 

You need to login to post a comment.