Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1677)

Unified Diff: build/symlink.py

Issue 1811933007: Expand the ~ character in link_names of symlink.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a much-needed usage docstring. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/symlink.py
diff --git a/build/symlink.py b/build/symlink.py
index 21b79b9a46754db70604d1962d044b43df38d895..5a261dcad93e1bddc77b42312f552a12dc8c131f 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:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698