#!/bin/sh
#
# Slatec
#
r="../../../xgen/xgen/src"
s="../bin"
# find other annoying problems
#
export PATH
PATH="$s:/usr/X11R5/bin:/usr/ucb:/bin:/usr/bin:/etc:$r"
if tokens | grep Expires  > /dev/null
then
g=""
else
echo "You must klog before using SLATEC documentation"
exit
fi
#
x=`xdpyinfo | egrep 'class: | depth:'`
if [ ! "$x" ] ;then echo "FATAL: try setenv DISPLAY `hostname`:0.0"; exit ;fi
# 
# ultrix sh has trouble setting global vars -- once
# set they stay set? setting them in loops freq.fails?
# so dont set global til very end-- once!
#
c="-DGREYSCALE"
if echo $x | egrep 'Color.*depth.*8 planes' >/dev/null
then 
c=""
fi
if echo $x | egrep 'Color.*depth.*4 planes' >/dev/null
then 
c="-DFOURPLANE"
fi
#
echo "Loading..."
$r/xgen $c -I$s/bin $s/bin/sltc.xgen
exit 0
