tst revision 3f54fd611f536639ec30dd53c48e5ec1897cc7d9
1a38107941725211e7c3f051f7a8f5e12199f03acmaeder: tst "[ cmp | old | new ] item ..."
e9458b1a7a19a63aa4c179f9ab20f4d50681c168Jens ElknerHTML2RTF=${HTML2RTF:-html2rtf}
097b7fb3f8f90e87120d30bf37a1d89fe0ddfaf0Kristina SojakovaTROFF2HTML=${TROFF2HTML:-troff2html}
211c5fb252e0a776baad9a4857ab198659289a4aKristina Sojakova print -u2 $command: "$@"
b5702fcfbabcc2b13557bc96ed8376133420dc73Kristina Sojakova print -u2 Usage: "$command [ cmp | new | old ] item ..."
b5702fcfbabcc2b13557bc96ed8376133420dc73Kristina Sojakovasuffixes="html rtf"
b5702fcfbabcc2b13557bc96ed8376133420dc73Kristina Sojakovado test -f $item || error $item: not found
b5702fcfbabcc2b13557bc96ed8376133420dc73Kristina Sojakova base=${item%.*}
9d770d1ea15092156d65e2a89b081eeeb8c6b153Kristina Sojakova cmp) for suffix in $suffixes
9d770d1ea15092156d65e2a89b081eeeb8c6b153Kristina Sojakova do for prefix in old new
9d770d1ea15092156d65e2a89b081eeeb8c6b153Kristina Sojakova do test -f $prefix-$base.$suffix || error $prefix-$base.$suffix: not found
d71bb9deea089887b4fd829c5b766e7e4de9f204Kristina Sojakova cmp -s new-$base.$suffix old-$base.$suffix || print -u2 $base $suffix output differs
9d770d1ea15092156d65e2a89b081eeeb8c6b153Kristina Sojakova new) prefix=$op
2ddc9d39235393dca2e40203dde20284db4c3deeKristina Sojakova $TROFF2HTML $macros $item > $prefix-$base.html
2c47bb55d963ff37dbae4a0a7701274fddb95fc8Christian Maeder $HTML2RTF $prefix-$base.html > $prefix-$base.rtf
8b054cade993ef373d564b2d74c9c5a2da48f8b7Kristina Sojakova old) for suffix in $suffixes
8b054cade993ef373d564b2d74c9c5a2da48f8b7Kristina Sojakova do for prefix in old new
9d770d1ea15092156d65e2a89b081eeeb8c6b153Kristina Sojakova do test -f $prefix-$base.$suffix || error $prefix-$base.$suffix: not found
1a38107941725211e7c3f051f7a8f5e12199f03acmaeder mv new-$base.$suffix old-$base.$suffix