#!/bin/sh
# This is a starting script for mif2xfig.
# PROGRES can print (parts of) its specifications in mif format
# (a format Adobe FrameMaker can handle). With that little tool
# you can convert the mif output to xfig format for use in LaTeX.

# Determine which operating system version the host has
osver=`uname -a`
case $osver in
SunOS*5.*)    # Solaris 2.x
        PLATFORM=sol2
        OSVERSION=SOL2
        OSDYNLIBEXT=so;;
SunOS*4.1.*)  # SunOS 4.1.x
        echo "SunOS4.1.x machines are no longer supported."
        echo "Please rlogin on a machine running under Solaris2.x."
        exit 1
        PLATFORM=sunos4
        OSVERSION=SUNOS4
        OSDYNLIBEXT=so.0.0;;
Linux*2.*)  # Linux 2.0.x
        PLATFORM=linuxlibc6
        OSVERSION=LINUXLIBC6
        OSDYNLIBEXT=so;;	
*)      echo 'unknown os version' ;;  
esac
export PLATFORM OSVERSION OSDYNLIBEXT

 
PROGRESROOT=${PROGRESROOT:-/home/projects/progres}
export PROGRESROOT


if [ ! -f $PROGRESROOT/bin/$OSVERSION/mif2xfig ]
then
	echo "Variable PROGRESROOT has wrong value!"
   	echo "Change default value in this script!"
	exit 1
fi

if [ ! -f header.tex ]
then
   cp  $PROGRESROOT/man/header.tex .
fi

$PROGRESROOT/bin/$OSVERSION/mif2xfig $*
