summaryrefslogtreecommitdiff
path: root/tools/clean-diff
blob: 98e26a79f9a420c126a65edd23d892ff4c5e0247 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
sed '/^+[^+]/!s/	/TaBBaT/g' |\
 expand -t `seq -s , 9 8 200` |\
 sed 's/TaBBaT/	/g' |\
 sed '/^+[^+]/s/ * $//' |\
 tr -d '\015' |\
 tr '\n' '°' |\
 sed 's/\(@@[^@]*@@°[^@]*\)/\n\1/g' |\
 egrep -v '@@[^@]*@@°(( [^°]*°)|([+-][[:space:]]*°)|(-[[:space:]]*([^°]*)°\+[[:space:]]*\5°))*$' |\
 tr -d '\n' |\
 tr '°' '\n'