#!/bin/sh
###########################################################
# Copyright (C) 2001-2009, CompHEP Collaboration
###########################################################
export COMPHEP=@CHEP@

if (test -z $1) then
   echo "***********************************************"
   echo "* INPUT ERROR: no events files to mix         *"
   echo "* usage:                                      *"
   echo "*     ./mix {files_with_events}               *"
   echo "***********************************************"
  exit 99
fi

if (test -x $COMPHEP/bin/mix.exe) then
  if [ x$1 = xDEBUG ]; then
    ddd $COMPHEP/bin/mix.exe
  else
    $COMPHEP/bin/mix.exe $*
  fi
else
  echo ""
  echo "  mix (error): no file $COMPHEP/bin/mix.exe. Compile CompHEP"
  echo ""
  exit -1
fi
