#!/bin/bash

if [ "$XIA2_ROOT"=="" ]; then
  full_path="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")"
  export XIA2_ROOT=`dirname "$full_path" | sed 's/\/Applications$//'`
fi

if [ -n "$XIA2_CCTBX" ]; then 
  ${XIA2_CCTBX}/bin/cctbx.python -Q warn \
    ${XIA2_ROOT}/Applications/xia2merger.py $@
else
  cctbx.python -Q warn ${XIA2_ROOT}/Applications/xia2merger.py $@
fi



