X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=util%2Fmklink.pl;h=9e9c9a514677af6385dbe8e9d15f02e65ffe72a4;hb=77a8eb352fa39b1499300683c0445602e26c1239;hp=de555820ec9ef4556f85ff4534d9179309a0bf12;hpb=21f213edfb36f60338cd0aa1e2f8847522b57fa0;p=openssl.git diff --git a/util/mklink.pl b/util/mklink.pl index de555820ec..9e9c9a5146 100755 --- a/util/mklink.pl +++ b/util/mklink.pl @@ -48,8 +48,13 @@ foreach $dirname (@from_path) { my $to = join('/', @to_path); my $file; +$symlink_exists=eval {symlink("",""); 1}; foreach $file (@files) { -# print "ln -s $to/$file $from/$file\n"; - symlink("$to/$file", "$from/$file"); - print $file . " => $from/$file\n"; + my $err = ""; + if ($symlink_exists) { + symlink("$to/$file", "$from/$file") or $err = " [$!]"; + } else { + system ("cp", "$file", "$from/$file") and $err = " [$!]"; + } + print $file . " => $from/$file$err\n"; }