#!/bin/bash
#
# Licensed Program Product:
#   VisualAge Smalltalk Enterprise V6.0.3
#
# (C) COPYRIGHT International Business Machines Corp. 1995, 2005
# All Rights Reserved
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with
# IBM Corp. and its licensors.
#
# Generated   InstallScriptsEtc  (01/28/2002 05:01:46 PM)

# - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# script:  abtdoc
# purpose: Starts the VisualAge Document Server.
# parms:   -z.host=aHostname  {optional} 
#
# Example invocation:
#    nohup /opt/IBMvast/6.0/help/bin/abtdoc&
#
#    Notes: 
#     1. nohup ('no hangup') is used to create a process that won't die if
#         the original logon process terminates.
#
#     2. The output of nohup will be placed into nohup.out within the
#         current working directory (..at the time you started abtdoc).
#         As a consequence of this the user executing the command must
#         either have file create and write access withing the working 
#         directory or else the output must be redirected to a suitable
#         file.  (nohup.out is not created if the output is redirected.
#         Please see the nohup man page for complete details.)
#
#     3. By default the document server runs on 'localhost'.  If you wish to
#         share the document server with other machines then you must
#         use the -z.host= option to specifiy your hostname.  For example,
#         if you are starting abtdoc on the machine with the hostname 'talksmall'
#         then your startup command might look like this:
#
#             nohup /opt/IBMvast/6.0/help/bin/abtdoc -z.host=talksmall&
#
#     4. The user id under which abtdoc is run requires read access to the
#         /opt/IBMvast/6.0/help directory tree.
# - - - - - - - - - - - - - - - - - - - - - - - - - - - -

#
# Change the value of $vastroot if VisualAge Smalltalk is moved to a different location.
#
vastroot=/opt/IBMvast/6.0

helpBinDir=$vastroot/help/bin

export LD_LIBRARY_PATH=$helpBinDir:$LD_LIBRARY_PATH
export PATH=$helpBinDir:$PATH

abtdocBinary=$helpBinDir/esnx

$abtdocBinary -mcd -no_break -i$helpBinDir/abtdoc.icx -ini:$helpBinDir/abtdoc.ini -z.ver=6.0 $1

exit 0
