summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic/ruhyphen/mkcyryo
blob: 286c8657549f0805eb649af0db80396c30b2c794 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
# make patterns for the cyryo by repeating patterns for cyre

TMP=.cyryo-tmp

awk '/^\\patterns{/ {p=1;next} /^}/ {p=0;next} p {print}' $1 > $TMP
cat $TMP | grep 'Å' | grep -v 'Å[^Å]*Å' > ${TMP}1
cat $TMP | grep 'Å[^Å]*Å' | grep -v 'Å[^Å]*Å[^Å]*Å' > ${TMP}2
cat $TMP | grep 'Å[^Å]*Å[^Å]*Å' > ${TMP}3
test ! -s ${TMP}3 || { echo "*** triple cyre detected in $1:" 1>&2; cat ${TMP}3 1>&2; }

{
echo "% accompanying patterns for cyryo generated from $1"
echo "\patterns{"
cat ${TMP}1 | sed 's,Å,£,'
cat ${TMP}2 | sed 'y,Å,£,'
cat ${TMP}2 | sed 's,Å,£,'
cat ${TMP}2 | sed 's,Å,£,2'
echo "}"
} | ./reduce-patt | ./sorthyph

rm -f $TMP ${TMP}[123]