/ Published in: Bash
tested only on mac osx terminal
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/bin/bash PATH_TO_FILTER="$(pwd | awk -F "/" '{print $(NF)}')"; 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) #usage: #{COMMAND_NAME} test.zip -l2 # will get the last 2 revisions and add the added or changed files to the text.zip file