if [ -z ${CONDA_BUILD+x} ]; then
    source /srv/jenkins/workspace/AstroConda/public_RHEL-6_py3.7_np1.16/_dispatch/miniconda/conda-bld/webbpsf-data_1639559050935/work/build_env_setup.sh
fi
mkdir -p $PREFIX/share
mkdir -p $PREFIX/etc/conda/activate.d
mkdir -p $PREFIX/etc/conda/deactivate.d

# Different conda-build releases do different things
# SRC_DIR is "usedir" for all intents and purposes
usedir="$(pwd)"
if [[ -d ${usedir}/work ]]; then
    usedir=${usedir}/work
fi

rsync -a ${usedir}/* $PREFIX/share/webbpsf-data

echo "
export WEBBPSF_PATH=$PREFIX/share/webbpsf-data
" > $PREFIX/etc/conda/activate.d/webbpsf-data.sh

echo "
unset WEBBPSF_PATH
" > $PREFIX/etc/conda/deactivate.d/webbpsf-data.sh