installer: use 'mkdir -p' before 'ln -sf'

Fixes the "ln: failed to create symbolic link
'.../usr/lib/libreoffice/sdk/classes/win/unowinreg.dll': No such file or
directory" problem, reported at
http://lists.freedesktop.org/archives/libreoffice/2013-November/057443.html

Change-Id: Ibe7dbbecc670921ca3c372cc9b8655cf2f50aefa
This commit is contained in:
Miklos Vajna 2013-11-13 10:02:22 +01:00
parent e667062310
commit 85d584416f

View File

@ -23,6 +23,7 @@ use File::Copy;
use File::stat;
use File::Temp qw(tmpnam);
use File::Path;
use File::Basename;
use installer::control;
use installer::converter;
use installer::exiter;
@ -369,7 +370,9 @@ sub install_simple ($$$$$$)
my $onelink = ${$unixlinksarray}[$i];
my $target = $onelink->{'Target'};
my $destination = $onelink->{'destination'};
my $cmd = "ln -sf '$target' '$destdir$destination'";
my $cmd = "mkdir -p '" . dirname($destdir . $destination) . "'";
system($cmd) && die "Failed to execute \"$cmd\"";
$cmd = "ln -sf '$target' '$destdir$destination'";
system($cmd) && die "Failed \"$cmd\"";
push @lines, "$destination\n";