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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 9.4.p3)


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