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

github.com/moses-smt/moses-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <fishandfrolick@gmail.com>2013-01-08 01:11:10 +0400
committerHieu Hoang <fishandfrolick@gmail.com>2013-01-08 01:11:10 +0400
commitbfb6cc4ff69e32dc7ada8a7343637d89efc295ec (patch)
tree8b3bf1d1da1eacd519d94fe436fce8676b0027ee
parent196e3674ba86f9690f8962d7517054c3ff45246d (diff)
mac fix
-rwxr-xr-xtests/misc.extract-parallel/run.perl19
1 files changed, 17 insertions, 2 deletions
diff --git a/tests/misc.extract-parallel/run.perl b/tests/misc.extract-parallel/run.perl
index f93d38c..427a55c 100755
--- a/tests/misc.extract-parallel/run.perl
+++ b/tests/misc.extract-parallel/run.perl
@@ -17,9 +17,24 @@ GetOptions("moses-root=s" => \$mosesRoot,
"results-dir=s"=> \$results_dir,
) or exit 1;
-my $cmd;
+my $splitCmd = `gsplit --help 2>/dev/null`;
+if($splitCmd) {
+ $splitCmd = 'gsplit';
+}
+else {
+ $splitCmd = 'split';
+}
+
+my $sortCmd = `gsort --help 2>/dev/null`;
+if($sortCmd) {
+ $sortCmd = 'gsort';
+}
+else {
+ $sortCmd = 'sort';
+}
-$cmd = "$mosesRoot/scripts/generic/extract-parallel.perl 2 split sort $mosesBin/extract $test_dir/$test_name/en $test_dir/$test_name/fr $test_dir/$test_name/align.fr-en $results_dir/extract 7 --GZOutput 2> $results_dir/log";
+my $cmd;
+$cmd = "$mosesRoot/scripts/generic/extract-parallel.perl 2 $splitCmd $sortCmd $mosesBin/extract $test_dir/$test_name/en $test_dir/$test_name/fr $test_dir/$test_name/align.fr-en $results_dir/extract 7 --GZOutput 2> $results_dir/log";
print STDERR "Executing: $cmd\n";
`$cmd`;
my $is_osx = ($^O eq "darwin");