#!/bin/bash
#
#    Project: The EDNA Kernel
#             http://www.edna-site.org
#
#    File: "$Id:$"
#
#    Copyright (C) 2008-2009 European Synchrotron Radiation Facility
#                            Grenoble, France
#
#    Principal authors: Jerome Kieffer (kieffer@esrf.fr)
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU Lesser General Public License as published
#    by the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU Lesser General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    and the GNU Lesser General Public License  along with this program.  
#    If not, see <http://www.gnu.org/licenses/>.
#

if [ -z $PYTHON ];
then
    echo "Note: If you encounter a python error at this step, "
    echo "      please check that the \$PYTHON environment variable "
    echo "      correspond to the python binary you intent to use."    
    export PYTHON=$(which python)
    echo "\$PYTHON = $PYTHON" 
fi

full_path=$( readlink -fn $0 )
edna_kernel_bin_path=$( dirname "${full_path}" )

${PYTHON} -u $edna_kernel_bin_path/edna-analyse-profile.py $*

 