#!/bin/csh
#
# Initialize the PADE CAML Utilities for a new user.
#
# -- Set the CAML_UTILS_HOME variable to point to the top of where the nist_pade
# -- caml_utils distribution is installed.
#setenv CAML_UTILS_HOME /usr/local/apps/nist_pade/caml_utils

setenv PVMUSER ~/pvm3
setenv PVMARCH `${PVM_ROOT}/lib/pvmgetarch`

if (! $?CAML_UTILS_HOME) then
  echo "To use padeinituser, define CAML_UTILS_HOME and rerun it."
  exit -1
endif

if ( ! -e ${PVMUSER}/bin/${PVMARCH} ) then
  mkdir -p ${PVMUSER}/bin/${PVMARCH}
endif

foreach prog (pvmmake targets pvmstat)
  if ( ! -e ${PVMUSER}/bin/${PVMARCH}/${prog}) then
    ln -s ${CAML_UTILS_HOME}/${PVMARCH}/${prog} ${PVMUSER}/bin/${PVMARCH}/${prog}
  endif
end
