mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
* Check for collissions.
This commit is contained in:
parent
278ea4097e
commit
31f177ef0a
1 changed files with 3 additions and 0 deletions
|
@ -40,6 +40,9 @@ sub createLinks {
|
|||
}
|
||||
-d $dstfile or die "$dstfile is not a directory";
|
||||
createLinks($srcfile, $dstfile);
|
||||
} elsif (-l $dstfile) {
|
||||
my $target = readlink($dstfile);
|
||||
die "collission between $srcfile and $target";
|
||||
} else {
|
||||
print "linking $dstfile to $srcfile\n";
|
||||
symlink($srcfile, $dstfile) or
|
||||
|
|
Loading…
Reference in a new issue