summaryrefslogtreecommitdiff
path: root/tools/murge
blob: f22fcfda81911ae821f6ddce8a413fc6349fefd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh

grep -A99999 '^<<<<<<<' | grep -B99999 '^>>>>>>>' >murge.X
grep -A99999 '^====' murge.X | egrep -v '^(=======|<<<<<<<|>>>>>>>|\|\|\|\|\|\|\|)' >murge.theirs
grep -B99999 '^||||' murge.X | egrep -v '^(=======|<<<<<<<|>>>>>>>|\|\|\|\|\|\|\|)' >murge.ours
grep -B99999 '^====' murge.X | grep -A99999 '^||||' | egrep -v '^(=======|<<<<<<<|>>>>>>>|\|\|\|\|\|\|\|)'  >murge.common

colordiff -du $* murge.ours murge.theirs
grep . murge.common > /dev/null && colordiff -du $* murge.common murge.theirs
grep . murge.common > /dev/null && colordiff -du $* murge.common murge.ours
rm murge.theirs murge.common murge.ours murge.X