#!/bin/sh

X11LOCAL=/usr/local/X11-local
app=`expr //$0 : '.*/\(.*\)'`

appdir=$app
test -d $X11LOCAL/$app/current && appdir=$app/current

XFSP=$X11LOCAL/$appdir/lib/app-defaults

XFILESEARCHPATH=$XFSP/%N:$XFILESEARCHPATH; export XFILESEARCHPATH
path=$X11LOCAL/$appdir/bin:$PATH
if test $# -eq 0
then
PATH=$path exec $app
else
PATH=$path exec $app "$@"
fi

###############################################################################
##                                                                           ##
## The purpose of this script is to provide a hook so that any X application ##
## that has a class specific application defaults file can be linked to it   ##
## and run without having to place that file in a standard place within the  ##
## installed X tree.  The assumption is made that applications, e.g. xother, ##
## are installed in directories that have the following minimum structure.   ##
## The version level may or may not exist. If it does then current should    ##
## be a symbolic link to the current (default) version.                      ##
##                                                                           ##
###############################################################################
##                                                                           ##
##                                  usr                                      ##
##                                   |                                       ##
##                                 local                                     ##
##                                   |                                       ##
##                               X11-local                                   ##
##                                   |                                       ##
##                                 xother                                    ##
##                                   |                                       ##
##                    +-----------------------------+                        ##
##                    |              |              |                        ##
##                 version1      version2  <---- current                     ##
##                                   |                                       ##
##                    +-----------------------------+                        ##
##                    |                             |                        ##
##                   bin                           lib                       ##
##                    |                             |                        ##
##                  xother                     app-defaults                  ##
##                                                  |                        ##
##                                                XOther                     ##
##                                                                           ##
###############################################################################


