#!/bin/sh
#
# alias all koi8* fonts to iso8859
# for openwin (NeWS) server
#
# 1996/09/04 - vsv
#

# binary fonts common directory (destination)
destdir=/usr/local/lib/openwin/fonts
hackdir=iso_hack
pwd=`pwd`

# binary font catalogue order
koi8fonts="100dpi 75dpi misc"

# bldfamily alias sources file name (fonts.alias in X11 world)
alias=Synonyms.list


# make sure destination directory exist
cd $destdir || exit 1;
rm -rf ./$hackdir || exit 1
mkdir ./$hackdir || exit 1

(
for font in $koi8fonts
do
	$pwd/KOI2iso_openwin < $font/Families.list		|| exit 1
	true;
done
# NOTE: sort is illegal - order must be remain the same one
#
# ) | grep -e '^/-adobe-' | sort -u > $hackdir/$alias.new
#
) | grep -e '^/-adobe-' > $hackdir/$alias.new

cd $hackdir && \
mv $alias.new $alias && \
bldfamily -d .
