diff options
Diffstat (limited to 'scripts/ems/support/run-command-on-multiple-refsets.perl')
-rwxr-xr-x | scripts/ems/support/run-command-on-multiple-refsets.perl | 14 |
1 files changed, 14 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 new file mode 100755 index 000000000..1a7ef9e8e --- /dev/null +++ b/scripts/ems/support/run-command-on-multiple-refsets.perl @@ -0,0 +1,14 @@ +#!/usr/bin/perl -w + +use strict; + +die("ERROR: syntax: run-command-on-multiple-refsets.perl cmd in out") + unless scalar @ARGV == 3; +my ($cmd,$in,$out) = @ARGV; + +for(my $i=0;-e "$in.ref$i";$i++) { + my $single_cmd = $cmd; + $single_cmd =~ s/mref-input-file/$in.ref$i/g; + $single_cmd =~ s/mref-output-file/$out.ref$i/g; + system($single_cmd); +} |