OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # coding: utf-8 | 2 # coding: utf-8 |
3 | 3 |
4 # This Source Code Form is subject to the terms of the Mozilla Public | 4 # This Source Code Form is subject to the terms of the Mozilla Public |
5 # License, v. 2.0. If a copy of the MPL was not distributed with this | 5 # License, v. 2.0. If a copy of the MPL was not distributed with this |
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/. | 6 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
7 | 7 |
8 import sys | 8 import sys |
9 import os | 9 import os |
10 import posixpath | 10 import posixpath |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 file_content.append(pattern) | 273 file_content.append(pattern) |
274 f.seek(0, os.SEEK_SET) | 274 f.seek(0, os.SEEK_SET) |
275 f.truncate() | 275 f.truncate() |
276 for l in file_content: | 276 for l in file_content: |
277 print >>f, l | 277 print >>f, l |
278 | 278 |
279 if __name__ == "__main__": | 279 if __name__ == "__main__": |
280 logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO) | 280 logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO) |
281 repos = sys.argv[1:] | 281 repos = sys.argv[1:] |
282 if not len(repos): | 282 if not len(repos): |
283 repos = [os.getcwd()] | 283 repos = [os.path.dirname(sys.argv[0])] |
284 for repo in repos: | 284 for repo in repos: |
285 resolve_deps(repo) | 285 resolve_deps(repo) |
OLD | NEW |