Last active
December 11, 2015 23:48
-
-
Save randomekek/4678996 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ -n "$(svn st | egrep '^A|M' | awk '{print$2}' | xargs cat | grep -i '@todo')" ]; then | |
| echo 'There are TODOs:'; | |
| svn st | egrep '^A|M' | awk '{print$2}' | while read filename; do | |
| if [ -n "$(cat $filename | head -c 100000 | grep -i '@todo')" ]; then | |
| echo $filename | |
| cat $filename | head -c 100000 | grep -i '@todo' | awk '{ sub(/^[ *]*/, "", $0); print " > " $0 }' | |
| echo | |
| fi | |
| done | |
| else | |
| svn ci | |
| fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment