Beware: this code might break with multi word filenames...
usage :
# ./svn_bulk ? add ---> this shows a preview of the actions
# ./svn_bulk ? add 1 ---> action !
#!/usr/bin/ruby sign, action, doit = ARGV sign = '\?' if sign == '?' list = IO.popen("svn st") list.each {|i| if (i =~ /^#{sign}\s*(.*)/) cmd = "svn #{action} '"+$1+"'" print cmd + "\n" system(cmd) if doit end }
sign, action, doit = ARGV
sign = '\?' if sign == '?'
list = IO.popen("svn st")
list.each {|i|
if (i =~ /^#{sign}\s*(.*)/)
cmd = "svn #{action} '"+$1+"'"
print cmd + "\n"
system(cmd) if doit
end
}
# usage :
# ./svn_bulk ? add ---> this shows a preview of the actions
# ./svn_bulk ? add 1 ---> action !