Permalink
Browse files

ngx-links: fixed compatibility on Solaris.

  • Loading branch information...
agentzh committed Jan 4, 2013
1 parent a7d5807 commit 84a8ccbe861bdf0283d3b8415ea9150e842515c0
Showing with 10 additions and 1 deletion.
  1. +10 −1 ngx-links
View
@@ -49,7 +49,16 @@ while (my $entry = readdir $dir) {
warn "overriding existing symlink $target\n";
}
#warn "creating $target --> $root/$entry\n";
- system("ln -svf `pwd`/$source $target") == 0 or
+
+ my $ln;
+ if ($^O eq 'solaris') {
+ $ln = "ln -sf";
+
+ } else {
+ $ln = "ln -svf";
+ }
+
+ system("$ln `pwd`/$source $target") == 0 or
die "Failed to create the symlink\n";;
push @links, $target;

0 comments on commit 84a8ccb

Please sign in to comment.