summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorbpastene <bpastene@chromium.org>2016-03-21 10:52:28 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-21 17:54:51 +0000
commita516b28437b3f5f483b2dc9e7f175ca94bdd1223 (patch)
treee0de1850a87879bcbf6c16cff38ab5170005513a /build
parent70588c566c9586dc1fc3ad7e280d1b3ddf202dcc (diff)
downloadchromium_src-a516b28437b3f5f483b2dc9e7f175ca94bdd1223.zip
chromium_src-a516b28437b3f5f483b2dc9e7f175ca94bdd1223.tar.gz
chromium_src-a516b28437b3f5f483b2dc9e7f175ca94bdd1223.tar.bz2
Expand the ~ character in link_names of symlink.py
BUG=565452 Review URL: https://codereview.chromium.org/1811933007 Cr-Commit-Position: refs/heads/master@{#382321}
Diffstat (limited to 'build')
-rwxr-xr-xbuild/symlink.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/build/symlink.py b/build/symlink.py
index 21b79b9..5a261dc 100755
--- a/build/symlink.py
+++ b/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,7 @@ 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: