summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/util/mklink.pl
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/util/mklink.pl')
-rwxr-xr-xcrypto/openssl/util/mklink.pl7
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/openssl/util/mklink.pl b/crypto/openssl/util/mklink.pl
index 9386da7..d9bc98a 100755
--- a/crypto/openssl/util/mklink.pl
+++ b/crypto/openssl/util/mklink.pl
@@ -15,12 +15,14 @@
# Apart from this, this script should be able to handle even the most
# pathological cases.
+use Cwd;
+
my $from = shift;
my @files = @ARGV;
my @from_path = split(/[\\\/]/, $from);
-my $pwd = `pwd`;
-chop($pwd);
+my $pwd = getcwd();
+chomp($pwd);
my @pwd_path = split(/[\\\/]/, $pwd);
my @to_path = ();
@@ -52,6 +54,7 @@ $symlink_exists=eval {symlink("",""); 1};
foreach $file (@files) {
my $err = "";
if ($symlink_exists) {
+ unlink "$from/$file";
symlink("$to/$file", "$from/$file") or $err = " [$!]";
} else {
unlink "$from/$file";
OpenPOWER on IntegriCloud