#! /bin/sh
# Run x3270 out of 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 app-defaults path
#
# Note: Unless XFILESEARCHPATH is already set before this script is run, this
#  may interfere with the operation of other applications such as xterm.
#
XFILESEARCHPATH=./%N%S.ad:$XFILESEARCHPATH
export XFILESEARCHPATH

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

# Clean up
xset -fp $d
xset fp rehash
