summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/util/mklink.pl
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/util/mklink.pl')
-rw-r--r--src/lib/libcrypto/util/mklink.pl11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/libcrypto/util/mklink.pl b/src/lib/libcrypto/util/mklink.pl
index de555820ec..9e9c9a5146 100644
--- a/src/lib/libcrypto/util/mklink.pl
+++ b/src/lib/libcrypto/util/mklink.pl
@@ -48,8 +48,13 @@ foreach $dirname (@from_path) {
48my $to = join('/', @to_path); 48my $to = join('/', @to_path);
49 49
50my $file; 50my $file;
51$symlink_exists=eval {symlink("",""); 1};
51foreach $file (@files) { 52foreach $file (@files) {
52# print "ln -s $to/$file $from/$file\n"; 53 my $err = "";
53 symlink("$to/$file", "$from/$file"); 54 if ($symlink_exists) {
54 print $file . " => $from/$file\n"; 55 symlink("$to/$file", "$from/$file") or $err = " [$!]";
56 } else {
57 system ("cp", "$file", "$from/$file") and $err = " [$!]";
58 }
59 print $file . " => $from/$file$err\n";
55} 60}