Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:33:41

0001 #!/bin/bash
0002 
0003 ###########################################################################
0004 ## This bash script is designed to be called from some sort of batch     ##
0005 ## system that does NOT have a local run area. DO NOT USE THIS TO RUN ON ##
0006 ## CONDOR.  This does NOT setup a CMSSW release.                         ##
0007 ##                                                                       ##
0008 ## You call the script:                                                  ##
0009 ## runCommand.bash directory  logfile executable [arg1 arg2...]          ##
0010 ##                                                                       ##
0011 ## cplager  090924                                                       ##
0012 ###########################################################################
0013 
0014 ## Used to run executables.
0015 if [ -z "$3" ]; then
0016   echo Usage: $0 directory logname executable \[arg1 arg2...\]
0017   exit;
0018 fi
0019 
0020 unset DISPLAY
0021 
0022 ## setup variables
0023 export DIR=$1
0024 shift
0025 export LOG=$1.log
0026 shift
0027 export EXE=$1
0028 shift
0029 
0030 # go to directory (which had better be in a CMSSW release)
0031 cd $DIR
0032 
0033 # DO NOT setup CMS environment
0034 
0035 echo "hostname:" `hostname` > $LOG
0036 date >> $LOG
0037 pwd >> $LOG
0038 echo $EXE $@ >> $LOG 2>&1
0039 (time $EXE $@)  >> $LOG 2>&1
0040