| OLD | NEW |
| 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 Loading... |
| 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() |
| OLD | NEW |