#!/bin/sh -e

AFFIXES=espa~nol.aff
CHARSETS="spanishtex tex plaintex html msdos utf8"

#cat $AFFIXES | sed '/^nroffchars/q' | grep -v ^nroffchars | ./latin1.pl
#tac $AFFIXES | sed'/^altstringchar/q' | grep -v ^altstringchar | tac | ./latin1.pl

cat $AFFIXES | sed '/^nroffchars/q' | grep -v ^nroffchars | sed -f debian/orig2latin1.sed
echo "# ----------------------------------------"
echo "# *** Beginning of Debian-only section ***"
echo "# ----------------------------------------"
#cat debian/charsets/[0-9]* | grep -v '^\#\-\#' | sed -f debian/base2latin1.sed
( cd debian/charsets && for i in base $CHARSETS; do cat $i; done) | grep -v '^\#\-\#' | sed -f debian/base2latin1.sed
echo "# End of debian charsets"
echo "# ----------------------------------------"
echo "# *** End of Debian-only section       ***" 
echo "# ----------------------------------------"
tac $AFFIXES | sed '/^altstringchar/q' | grep -v ^altstringchar | tac | sed -f debian/orig2latin1.sed
