#! /bin/sh
# lib/ditroff.font/makefamily
#
# Copyright (c) 1987 Adobe Systems Incorporated. All Rights Reserved.
# GOVERNMENT END USERS: See notice of rights in Notice file in release directory.
# RCSID: $Header: /afs/dev.mit.edu/source/src80/third/unsupported/transcript-v2.1/lib/ditroff.font/RCS/makefamily,v 1.7 1990/08/01 12:05:46 epeisach Exp $

# see README for more information
# makedev is the ditroff program that builds device descriptions

# Args: family-name  R-font  I-font  B-font  BI-font.

cd $DESTDIR/$DITDIR

orig=Times/devpsc
family=$1
new=$family/devpsc
shift

if test "$family" = "Times"
then
    echo "Times family cannot be re-created."
    exit 1
fi

rm -fr $family
mkdir $family $new

#(cd $orig; ln  *  $DESTDIR/$DITDIR/$new)
(cd $new; ln -s ../../$orig/* .)

for s in '' .aux .map .out
do
    rm -fr $new/R$s $new/I$s $new/B$s $new/BI$s
    ln -s ../../$orig/$1$s $new/R$s
    ln -s ../../$orig/$2$s $new/I$s
    ln -s ../../$orig/$3$s $new/B$s
    ln -s ../../$orig/$4$s $new/BI$s
done

for t in R I B BI
do
    cp $new/$t fam.$$
    rm -f $new/$t 
    rm $new/$t.out
    sed -e "/^name/s/.*/name $t/" fam.$$ >$new/$t
    rm -f fam.$$
done

cd $new
rm DESC.out
$MAKEDEV DESC
rm -f fam.$$
