Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ems/support/run-command-on-multiple-refsets.perl')
-rwxr-xr-xscripts/ems/support/run-command-on-multiple-refsets.perl5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/ems/support/run-command-on-multiple-refsets.perl b/scripts/ems/support/run-command-on-multiple-refsets.perl
index 1a7ef9e8e..7590e72a1 100755
--- a/scripts/ems/support/run-command-on-multiple-refsets.perl
+++ b/scripts/ems/support/run-command-on-multiple-refsets.perl
@@ -6,6 +6,11 @@ die("ERROR: syntax: run-command-on-multiple-refsets.perl cmd in out")
unless scalar @ARGV == 3;
my ($cmd,$in,$out) = @ARGV;
+die("ERROR: attempt to run on multiple references, but there is only one")
+ if -e $in && ! -e "$in.ref0";
+die("ERROR: did not find reference '$in.ref0'")
+ unless -e "$in.ref0";
+
for(my $i=0;-e "$in.ref$i";$i++) {
my $single_cmd = $cmd;
$single_cmd =~ s/mref-input-file/$in.ref$i/g;