#!/bin/ksh
EBMHOME=$1
. $EBMHOME/batchenv
if [ -z "$DISPLAY" ]
then
  echo "###                                                                          ###"
  echo "###   Batch Install Procedure Completed Successfully                         ###"
  echo "###                                                                          ###"
  echo "###                                                                          ###"
  echo "###   In order to configure Batch:                                           ###"
  echo "###                                                                          ###"
  echo "###   - Set the environment by sourcing the batchenv file. Type:             ###"
  echo "###                                                                          ###"
  echo "        .  $EBMHOME/batchenv"
  echo "###                                                                          ###"
  echo "###                                                                          ###"
  echo "###   - Start the Batch Administration Manager (BAM) session. Type:          ###"
  echo "###                                                                          ###"
  echo "        bam"
  echo "###                                                                          ###"
  echo "###                                                                          ###"
else
  ebmx
  status=$?
  if [ $status -eq 0 ]
  then
    echo "###                                                                          ###"
    echo "###   Batch Node Install Procedure Completed Successfully                    ###"
    echo "###                                                                          ###"
  else
    echo "###                                                                          ###"
    echo "###   Batch Node Install Procedure Completed Successfully                    ###"
    echo "###                                                                          ###"
    echo "###                                                                          ###"
    echo "###   In order to configure the batch node:                                  ###"
    echo "###                                                                          ###"
    echo "###   - Set the environment by sourcing the batchenv file. Type:             ###"
    echo "###                                                                          ###"
    echo "        .  $EBMHOME/batchenv"
    echo "###                                                                          ###"
    echo "###                                                                          ###"
    echo "###   - Start the Batch Administration Manager (BAM) session. Type:          ###"
    echo "###                                                                          ###"
    echo "        bam"
    echo "###                                                                          ###"
    echo "###                                                                          ###"
  fi
fi
