summaryrefslogtreecommitdiffstats
path: root/solenv/bin/linkoo
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-05-06 08:24:30 +0000
committerOliver Bolte <obo@openoffice.org>2005-05-06 08:24:30 +0000
commitf2d446bf358f67dffa4f21d2bd6868ea58dd5dd6 (patch)
tree6a8514c854d94cb4b88d9914cfdcc43606e82118 /solenv/bin/linkoo
parentINTEGRATION: CWS mmeeks07 (1.86.4); FILE MERGED (diff)
downloadcore-f2d446bf358f67dffa4f21d2bd6868ea58dd5dd6.tar.gz
core-f2d446bf358f67dffa4f21d2bd6868ea58dd5dd6.zip
INTEGRATION: CWS mmeeks06 (1.6.44); FILE MERGED
2005/05/05 11:23:13 mmeeks 1.6.44.1: #i48767# linkoo symlink related fix
Diffstat (limited to 'solenv/bin/linkoo')
-rwxr-xr-xsolenv/bin/linkoo23
1 files changed, 14 insertions, 9 deletions
diff --git a/solenv/bin/linkoo b/solenv/bin/linkoo
index b1bc4beebccf..f58446a29106 100755
--- a/solenv/bin/linkoo
+++ b/solenv/bin/linkoo
@@ -12,9 +12,9 @@
#
# $RCSfile: linkoo,v $
#
-# $Revision: 1.6 $
+# $Revision: 1.7 $
#
-# last change: $Author: hr $ $Date: 2005-04-11 08:58:17 $
+# last change: $Author: obo $ $Date: 2005-05-06 09:24:30 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -215,13 +215,18 @@ sub scan_and_link_files($$$)
my $dest = $installed_files->{$file};
if (-l "$dest/$file") {
- if (!$dry_run) {
- # re-write the link
- unlink ("$dest/$file");
- symlink ("$src/$file", "$dest/$file") || die "Failed to symlink: $!";
- print " [$file]";
- } else {
- print "re-make link $src/$file => $dest/$file\n";
+ my $link = readlink ("$dest/$file");
+ if ($link =~ /^\//) { # Absolute path
+ if (!$dry_run) {
+ # re-write the link
+ unlink ("$dest/$file");
+ symlink ("$src/$file", "$dest/$file") || die "Failed to symlink: $!";
+ print " [$file]";
+ } else {
+ print "re-make link $src/$file => $dest/$file\n";
+ }
+ } elsif ($dry_run) {
+ print "skipping symbolic link $dest/$file -> $link\n";
}
} else {
check_create_linked ($dest);