3 ################################################################################
4 ## A simple script that finds Subversion(1) conflicts using grep(1), and ##
5 ## displays them using sed(1). ##
6 ## This script does *NOT* fix them. *That* would be your job. ##
7 ################################################################################
8 ## FIXME: Poorly implemented, grep(1)s the directories 3 times. ##
9 ################################################################################
10 args='--color=auto --exclude-dir=".svn"'
13 fcount=`grep -rlI $args \>\>\>\>\>\>\> * | sed -n $=` ## grep(1), sed(1) ##
14 ccount=`grep -rI $args \>\>\>\>\>\>\> * | sed -n $=` ## grep(1), sed(1) ##
17 if [ "$fcount" = "" ]; then
20 elif [ "$fcount" = "1" ]; then
25 if [ "$ccount" = "" ]; then
28 elif [ "$ccount" = "1" ]; then
34 grep -rnI $args \>\>\>\>\>\>\> * ## grep(1) ##
35 echo "$ccount $cnum in $fcount $fnum." #########################################
36 ## Recursive, grep(1) every file ##
37 ## (except for the `.svn' directory) ##
38 ## in every directory for a conflict ##
40 #########################################