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

Unified Diff: build/find_depot_tools.py

Issue 1418513007: Move find_depot_tools.py to build/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review fixes Created 5 years, 2 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 | « build/download_sdk_extras.py ('k') | build/vs_toolchain.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/find_depot_tools.py
diff --git a/tools/find_depot_tools.py b/build/find_depot_tools.py
old mode 100644
new mode 100755
similarity index 82%
rename from tools/find_depot_tools.py
rename to build/find_depot_tools.py
index 1f91866279d2666f3e9832d85ddd609a0d4f503e..1c34fea6f6c6e1fd5aa8b7f48311502477397d42
--- a/tools/find_depot_tools.py
+++ b/build/find_depot_tools.py
@@ -1,3 +1,4 @@
+#!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -5,6 +6,9 @@
Will throw an ImportError exception if depot_tools can't be found since it
imports breakpad.
+
+This can also be used as a standalone script to print out the depot_tools
+directory location.
"""
import os
@@ -39,7 +43,18 @@ def add_depot_tools_to_path():
print >> sys.stderr, 'Failed to find depot_tools'
return None
-add_depot_tools_to_path()
+DEPOT_TOOLS_PATH = add_depot_tools_to_path()
# pylint: disable=W0611
import breakpad
+
+
+def main():
+ if DEPOT_TOOLS_PATH is None:
+ return 1
+ print DEPOT_TOOLS_PATH
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main())
« no previous file with comments | « build/download_sdk_extras.py ('k') | build/vs_toolchain.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698