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