Chromium Code Reviews| Index: tools/make_links.py |
| diff --git a/tools/make_links.py b/tools/make_links.py |
| index 5599e99880a363d5888dfe766282a87f64675ae3..52bac71fddc0ffddcfa3a50d0f7c35814678b25f 100644 |
| --- a/tools/make_links.py |
| +++ b/tools/make_links.py |
| @@ -28,6 +28,8 @@ import subprocess |
| import sys |
| import utils |
| +old_directories = {'package_config': |
|
ricow1
2015/08/10 10:19:30
add a note on what this is
Bill Hesse
2015/08/10 12:36:18
Done.
|
| + 'Please remove third_party/pkg/package_config.'} |
| def get_options(): |
| result = optparse.OptionParser() |
| @@ -86,6 +88,7 @@ def main(argv): |
| os.remove(full_link) |
| else: |
| os.makedirs(target) |
| + linked_names = {}; |
| for source in args[1:]: |
| # Assume the source directory is named ".../NAME/lib". |
| split = source.split(':') |
| @@ -98,6 +101,13 @@ def main(argv): |
| # Remove any additional path components preceding NAME, if one wasn't |
| # specified explicitly. |
| if not name: (_, name) = os.path.split(path) |
| + if name in linked_names: |
|
ricow1
2015/08/10 10:19:30
Add a comment stating what the issues is, somethin
Bill Hesse
2015/08/10 12:36:18
Done.
|
| + print 'Duplicate directory %s is linked to both %s and %s.' % ( |
| + name, linked_names[name], path) |
| + if name in old_directories: |
| + print old_directories[name] |
| + return 1 |
| + linked_names[name] = path |
| orig_source = source |
| if utils.GuessOS() == 'win32': |
| source = os.path.relpath(source) |