#! /bin/sh
# Run x3270 from the current directory

# Bomb on any error
set -e
d=`pwd`/

# Say what you're doing
set -x

# Set up the fonts
mkfontdir .
xset +fp $d
xset fp rehash

# Set up the dynamic library path
if [ -d /usr/openwin/lib ]
then	LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/openwin/lib
fi
if [ -d /usr/ucblib ]
then	LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/ucblib
fi
export LD_LIBRARY_PATH

# Run x3270
set +e
./x3270 "$@"

# Clean up
xset -fp $d
xset fp rehash
