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5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/advanced/ChargeExchangeMC/util/mkjob (Version 11.3.0) and /examples/advanced/ChargeExchangeMC/util/mkjob (Version 5.1.p1)


  1 #!/usr/bin/perl                                   
  2                                                   
  3 use Getopt::Std;                                  
  4                                                   
  5 our  $PreinitMacroDef = "preinit.mac";            
  6 our  $InitMacroDef = "init.mac";                  
  7 our  $OverrideOpt = "";                           
  8                                                   
  9 sub  PrintUsage                                   
 10 {                                                 
 11     print "Usage: [-p preinit_macro] [-m init_    
 12     print "\tThis program will create a job sc    
 13     print "project\n\t\t<job_id>; the job scri    
 14     print "'cexmc_'\n\t\tand appended by '_<su    
 15     print "\tDefault preinit_macro is '$Preini    
 16     print "is '$InitMacroDef'\n";                 
 17     print "\tIf '-r' is specified then a proje    
 18     print "new\n\t\tproject <job_id>_<suffix>     
 19     print "\t\tin this case will be ignored\n"    
 20     print "\tUse '-y' to override existing pro    
 21 }                                                 
 22                                                   
 23 sub VERSION_MESSAGE                               
 24 {                                                 
 25     PrintUsage;                                   
 26     exit 0;                                       
 27 }                                                 
 28                                                   
 29 getopts( "m:p:r:y" );                             
 30                                                   
 31 unless ( $ARGV[ 0 ] )                             
 32 {                                                 
 33     PrintUsage;                                   
 34     exit 1;                                       
 35 }                                                 
 36                                                   
 37 $opt_p ||= $PreinitMacroDef;                      
 38 $opt_m ||= $InitMacroDef;                         
 39 $opt_r &&= "_$opt_r";                             
 40 $OverrideOpt = "-y" if $opt_y;                    
 41                                                   
 42 open ( JOBFILE, "> cexmc_$ARGV[ 0 ]$opt_r.job"    
 43 print JOBFILE "#!/bin/sh\n";                      
 44 print JOBFILE "CEXMC_PROJECTS_DIR=" . $ENV{ 'C    
 45 print JOBFILE "PATH=" . $ENV{ 'PATH' } . "\n";    
 46 print JOBFILE "LD_LIBRARY_PATH=" . $ENV{ 'LD_L    
 47 if ( $opt_r )                                     
 48 {                                                 
 49     print JOBFILE "cexmc -m$opt_m $OverrideOpt    
 50     print JOBFILE "-w$ARGV[ 0 ]$opt_r\n";         
 51 }                                                 
 52 else                                              
 53 {                                                 
 54     print JOBFILE "cexmc -p$opt_p -m$opt_m $Ov    
 55 }                                                 
 56                                                   
 57 close ( JOBFILE ) or die $!;