<commit_before>#!/usr/bin/env perl

# Perl script to prepare and submit the nightly Condor builds in NMI:
# 1) Checks out the latest copy of nmi_tools/condor_nmi_submit.
# 2) Invokes condor_nmi_submit with the right arguments.

# Configuration
$home = '/home/cndrauto';
$cvs_dir = $home .'/cvs';
$log_dir = $home .'/log';
$log_file = $log_dir .'/nightly.log';
$CVS="/usr/bin/cvs -d /space/cvs/CONDOR_SRC";


# Open log file and setup autoflushing
unlink( "$log_file.old" );
rename( $log_file, "$log_file.old" );
open( LOG, ">$log_file" ) || die "Can't open $log_file: $!\n";
$save_fh = select(LOG);
$| = 1;
select($save_fh);


# Define a new version of die
$SIG{__DIE__} = sub { 
    my $message = shift; 
    print LOG "ERROR: $message"; 
    exit 1;
}; 


### Real work begins

print LOG "Starting: ". `date` ."\n";

chdir $cvs_dir || die "Can't chdir($cvs_dir): $!\n";

print LOG "Updating copy of condor_nmi_submit\n";
$checkout_cmd = "$CVS co nmi_tools/condor_nmi_submit";
open( CVS, "$checkout_cmd 2>&1|" ) || die "Can't execute $checkout_cmd: $!\n";
while (<CVS>) {
  print LOG $_;
}

print LOG "Running condor_nmi_submit\n";

$cns_cmd = "./nmi_tools/condor_nmi_submit --build --nightly --notify=<EMAIL>";

open( CNS, "$cns_cmd 2>&1|" ) || die "Can't execute $cns_cmd: $!\n";
while (<CNS>) {
  print LOG $_;
}

print LOG "Finished: ". `date` ."\n";<commit_msg>Added --use_externals_cache to the command-line args for condor_nmi_submit.<commit_after>#!/usr/bin/env perl

# Perl script to prepare and submit the nightly Condor builds in NMI:
# 1) Checks out the latest copy of nmi_tools/condor_nmi_submit.
# 2) Invokes condor_nmi_submit with the right arguments.

# Configuration
$home = '/home/cndrauto';
$cvs_dir = $home .'/cvs';
$log_dir = $home .'/log';
$log_file = $log_dir .'/nightly.log';
$CVS="/usr/bin/cvs -d /space/cvs/CONDOR_SRC";


# Open log file and setup autoflushing
unlink( "$log_file.old" );
rename( $log_file, "$log_file.old" );
open( LOG, ">$log_file" ) || die "Can't open $log_file: $!\n";
$save_fh = select(LOG);
$| = 1;
select($save_fh);


# Define a new version of die
$SIG{__DIE__} = sub { 
    my $message = shift; 
    print LOG "ERROR: $message"; 
    exit 1;
}; 


### Real work begins

print LOG "Starting: ". `date` ."\n";

chdir $cvs_dir || die "Can't chdir($cvs_dir): $!\n";

$CNS = "nmi_tools/condor_nmi_submit";

print LOG "Updating copy of $CNS\n";
$checkout_cmd = "$CVS co $CNS";
open( CVS, "$checkout_cmd 2>&1|" ) || die "Can't execute $checkout_cmd: $!\n";
while (<CVS>) {
  print LOG $_;
}

print LOG "Running condor_nmi_submit\n";

$cns_cmd = "./$CNS --build --nightly --use_externals_cache --notify=<EMAIL>";

open( CNS, "$cns_cmd 2>&1|" ) || die "Can't execute $cns_cmd: $!\n";
while (<CNS>) {
  print LOG $_;
}

print LOG "Finished: ". `date` ."\n";
{'fraction_non_alphanumeric': 0.18620443173695497, 'fraction_numerical': 0.005718370264474625, 'mean_word_length': 4.107664233576642, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4292317', 'n_tokens_mistral': 1183, 'n_tokens_neox': 1124, 'n_words': 305}