Zip from SVN change-log


/ Published in: Bash
Save to your folder(s)

tested only on mac osx terminal


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.