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

Side by Side Diff: chrome-update.py

Issue 118379: Display proper error if root path argument is not an existing directory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 11 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # Author: mpcomplete 6 # Author: mpcomplete
7 # 7 #
8 # This script updates and does a clean build of chrome for you. 8 # This script updates and does a clean build of chrome for you.
9 # Usage: python chrome-update.py C:\path\to\chrome\trunk 9 # Usage: python chrome-update.py C:\path\to\chrome\trunk
10 # 10 #
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 if options.print_latest: 138 if options.print_latest:
139 print GetRevision() or "HEAD" 139 print GetRevision() or "HEAD"
140 sys.exit(0) 140 sys.exit(0)
141 141
142 if not args: 142 if not args:
143 Message("Usage: %s <path\\to\\chrome\\root> [options]" % sys.argv[0]) 143 Message("Usage: %s <path\\to\\chrome\\root> [options]" % sys.argv[0])
144 sys.exit(1) 144 sys.exit(1)
145 145
146 chrome_root = args[0] 146 chrome_root = args[0]
147 if not os.path.isdir(chrome_root):
148 Message("Path to chrome root (%s) not found." % repr(chrome_root))
149 sys.exit(1)
147 150
148 if not options.nosync: 151 if not options.nosync:
149 rv = DoUpdate(chrome_root) 152 rv = DoUpdate(chrome_root)
150 if rv != 0: 153 if rv != 0:
151 Message("Update Failed. Bailing.") 154 Message("Update Failed. Bailing.")
152 sys.exit(rv) 155 sys.exit(rv)
153 156
154 chrome_sln = FixupPath(options.solution) 157 chrome_sln = FixupPath(options.solution)
155 rv = DoBuild(chrome_root, chrome_sln, options.clean, "Debug") 158 rv = DoBuild(chrome_root, chrome_sln, options.clean, "Debug")
156 if rv != 0: 159 if rv != 0:
157 Message("Debug build failed. Sad face :(") 160 Message("Debug build failed. Sad face :(")
158 161
159 if options.release: 162 if options.release:
160 rv = DoBuild(chrome_root, chrome_sln, options.clean, "Release") 163 rv = DoBuild(chrome_root, chrome_sln, options.clean, "Release")
161 if rv != 0: 164 if rv != 0:
162 Message("Release build failed. Sad face :(") 165 Message("Release build failed. Sad face :(")
163 166
164 if rv != 0: 167 if rv != 0:
165 sys.exit(rv) 168 sys.exit(rv)
166 169
167 Message("Success!") 170 Message("Success!")
168 171
169 if __name__ == "__main__": 172 if __name__ == "__main__":
170 Main() 173 Main()
OLDNEW
« 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