Posted By

mcarneiro on 05/03/10


Tagged

svn


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

nalmeida


Zip from SVN change-log


 / Published in: Bash
 

tested only on mac osx terminal

  1. #!/bin/bash
  2. PATH_TO_FILTER="$(pwd | awk -F "/" '{print $(NF)}')";
  3. zip $1 $(svn log $2 -v | grep $PATH_TO_FILTER | grep -E "\s+?[AMR]" | awk -F "$PATH_TO_FILTER/" '{print $2}' | awk '{print $1}' | grep "\." | sort -u)
  4.  
  5. #usage:
  6. #{COMMAND_NAME} test.zip -l2 # will get the last 2 revisions and add the added or changed files to the text.zip file

Report this snippet  

You need to login to post a comment.