summaryrefslogtreecommitdiff
path: root/language/hyphenation/ruhyphen/mkcyryo
diff options
context:
space:
mode:
Diffstat (limited to 'language/hyphenation/ruhyphen/mkcyryo')
-rw-r--r--language/hyphenation/ruhyphen/mkcyryo22
1 files changed, 22 insertions, 0 deletions
diff --git a/language/hyphenation/ruhyphen/mkcyryo b/language/hyphenation/ruhyphen/mkcyryo
new file mode 100644
index 0000000000..286c865754
--- /dev/null
+++ b/language/hyphenation/ruhyphen/mkcyryo
@@ -0,0 +1,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]