Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi,

If ./download is run twice:

 - the first time it creates e.g. symlink ure connectivity -> clone/libs-core/connectivity

 - the second time it creates a symlink named connectivity/connectivity
   (thus clone/libs-core/connectivity/connectivity) pointing to
   clone/libs-core/connectivity, that is pointing to
   ROOT_OF_SOURCE_TREE/clone/libs-core/connectivity/clone/libs-core/connectivity .

That second symlink is not what was intended and is a dangling
symlink. The attached patch fixes that, telling ln to always create
the symlink as named on the command line, and to never implicitly
create a symlink named after the target in the directory named on the
command line.

-- 
Lionel
From 550cc46bb943d10a294aa6fb450a2d7ef9c2baca Mon Sep 17 00:00:00 2001
From: Lionel Elie Mamane <lionel@mamane.lu>
Date: Sat, 13 Aug 2011 21:13:25 +0200
Subject: [PATCH] download: when run twice, do not create foo/foo symlink

---
 download |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/download b/download
index a322936..0d4432a 100755
--- a/download
+++ b/download
@@ -55,7 +55,7 @@ if [ -d .git ] ; then
         for i in $GIT_REPO_NAMES ; do
             bin/git-new-workdir $GIT_LINK_SRC/$i clone/$i
             for i in clone/$i/* ; do
-                ln -sf $i $(basename $i)
+                ln -sfT $i $(basename $i)
             done
         done
     fi
-- 
1.7.2.5


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.