summaryrefslogtreecommitdiffstats
path: root/util/mklink.pl
diff options
context:
space:
mode:
Diffstat (limited to 'util/mklink.pl')
-rwxr-xr-xutil/mklink.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/util/mklink.pl b/util/mklink.pl
index d7b997ada7..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) {
my $err = "";
- symlink("$to/$file", "$from/$file") or $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";
}