Skip to content

Commit

Permalink
Merge pull request #4246 from vrurg/rakudo_4234
Browse files Browse the repository at this point in the history
Fix `ln -nfs` on AIX
  • Loading branch information
vrurg committed Mar 13, 2021
2 parents 8efbdab + ad8fbed commit 5c5ffcd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 3rdparty/nqp-configure
21 changes: 21 additions & 0 deletions tools/build/ln_s.pl
@@ -0,0 +1,21 @@
#!/usr/bin/env perl
# Simulate 'ln -nfs' for AIX where -n means normal mode of operation, not what
# -n/-h means with GNU or BSD versions on ln.

shift @ARGV if $ARGV[0] eq '--';

unless (@ARGV == 2) {
print STDERR <<ERR;
Usage: $0 <target> <link_name>
ERR
exit 1;
}

my ($target, $link_name) = @ARGV;

if (-l $link_name || -f $link_name) {
unlink $link_name or die "Can't unlink '$link_name': $!";
}

symlink($target, $link_name)
or die "Can't symlink '$target' to '$link_name': $!";

0 comments on commit 5c5ffcd

Please sign in to comment.