#!/bin/sh

# Add a path to $PATH if it is missing

f_addpath () {

  echo $PATH | /bin/egrep -q "(^|:)$1($|:)"

  if [[ $? -ne 0 ]]; then
    if [[ -z $PATH ]]; then
      export PATH=$1
    else
      export PATH=$PATH:$1
    fi
  fi

}


# If we are being called a second time, return to the caller
[[ -n $WNCpid ]] && return 0

# Record the fact that we have been this way before
export WNCpid=$$


# Add anything missing to $PATH

f_addpath "/usr/bin"
f_addpath "/bin"




# Source the WN Client using the current release
source /cvmfs/osg.mwt2.org/osg/sw/osg-wn-client/setup.sh current
