summaryrefslogtreecommitdiffstats
path: root/chromium/build/symlink.py
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-05-09 14:22:11 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-05-09 15:11:45 +0000
commit2ddb2d3e14eef3de7dbd0cef553d669b9ac2361c (patch)
treee75f511546c5fd1a173e87c1f9fb11d7ac8d1af3 /chromium/build/symlink.py
parenta4f3d46271c57e8155ba912df46a05559d14726e (diff)
BASELINE: Update Chromium to 51.0.2704.41
Also adds in all smaller components by reversing logic for exclusion. Change-Id: Ibf90b506e7da088ea2f65dcf23f2b0992c504422 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'chromium/build/symlink.py')
-rwxr-xr-xchromium/build/symlink.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/chromium/build/symlink.py b/chromium/build/symlink.py
index 75a3e4e6d15..5a261dcad93 100755
--- a/chromium/build/symlink.py
+++ b/chromium/build/symlink.py
@@ -3,8 +3,15 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-"""Make a symlink and optionally touch a file (to handle dependencies)."""
+"""Make a symlink and optionally touch a file (to handle dependencies).
+Usage:
+ symlink.py [options] sources... target
+
+A sym link to source is created at target. If multiple sources are specfied,
+then target is assumed to be a directory, and will contain all the links to
+the sources (basenames identical to their source).
+"""
import errno
import optparse
@@ -28,6 +35,9 @@ def Main(argv):
t = os.path.join(target, os.path.basename(s))
if len(sources) == 1 and not os.path.isdir(target):
t = target
+ t = os.path.expanduser(t)
+ if os.path.realpath(t) == s:
+ continue
try:
os.symlink(s, t)
except OSError, e: