mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 11:25:40 +03:00
Merge pull request #110 from unhammer/extract-perl-abspath-when-ln
avoid bad symlinks in extract-parallel
This commit is contained in:
commit
1c99b2b2b8
@ -6,6 +6,7 @@
|
||||
use warnings;
|
||||
use strict;
|
||||
use File::Basename;
|
||||
use Cwd 'abs_path';
|
||||
|
||||
sub RunFork($);
|
||||
sub systemCheck($);
|
||||
@ -109,20 +110,20 @@ else
|
||||
{
|
||||
my $numStr = NumStr(0);
|
||||
|
||||
$cmd = "ln -s $target $TMPDIR/target.$numStr";
|
||||
$cmd = "ln -s ".abs_path($target)." $TMPDIR/target.$numStr";
|
||||
print STDERR "Executing: $cmd \n";
|
||||
`$cmd`;
|
||||
|
||||
$cmd = "ln -s $source $TMPDIR/source.$numStr";
|
||||
$cmd = "ln -s ".abs_path($source)." $TMPDIR/source.$numStr";
|
||||
print STDERR "Executing: $cmd \n";
|
||||
`$cmd`;
|
||||
|
||||
$cmd = "ln -s $align $TMPDIR/align.$numStr";
|
||||
$cmd = "ln -s ".abs_path($align)." $TMPDIR/align.$numStr";
|
||||
print STDERR "Executing: $cmd \n";
|
||||
`$cmd`;
|
||||
|
||||
if ($weights) {
|
||||
$cmd = "ln -s $weights $TMPDIR/weights.$numStr";
|
||||
$cmd = "ln -s ".abs_path($weights)." $TMPDIR/weights.$numStr";
|
||||
print STDERR "Executing: $cmd \n";
|
||||
`$cmd`;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user