Re: [ROOT] returning ROOT status to the shell

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Fri Jan 19 2001 - 10:53:40 MET


Hi Robert,

  several people have asked for this. We are working on it.

Cheers, Fons.



Robert Feuerbach wrote:
> 
> Hi,
> 
> I have a feature request: can ROOT be made to ROOT return a value other
> than zero?
> 
> I'd like to be able to run ROOT in the batch mode ( 'root -b -l -q' )
> and if it encounters an error or the macro-file exits with a return value,
> can that value be returned to the shell?
> 
> This is so I can run root in a script or a Makefile and test for success.
> eg:
> 
> $root_stat=`root -b -l -q mymacro.C`
> if [ $root_stat -ne 0 ]; then
>   echo "Broken Macro!!"
>   return 1
> fi
> 
> Thanks,
> Rob
> 
> --
> /***************************************************
>  * Robert Feuerbach   feuerbac@ernest.phys.cmu.edu *
>  * CMU Physics Department           (412) 268-2772 *
>  * Pittsburgh, PA 15213        FAX: (412) 681-0648 *
>  ***************************************************/

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:34 MET