| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2014 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2014 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 | 6 |
| 7 """Sync the Android sources.""" | 7 """Sync the Android sources.""" |
| 8 | 8 |
| 9 | 9 |
| 10 import os | 10 import os |
| 11 import shlex | 11 import shlex |
| 12 import sys | 12 import sys |
| 13 | 13 |
| 14 from build_step import BuildStep | 14 from build_step import BuildStep |
| 15 from utils import misc | 15 from py.utils import misc |
| 16 from utils import shell_utils | 16 from py.utils import shell_utils |
| 17 from utils.gclient_utils import GIT | 17 from utils.gclient_utils import GIT |
| 18 | 18 |
| 19 | 19 |
| 20 ANDROID_CHECKOUT_PATH = os.path.join(os.pardir, 'android_repo') | 20 ANDROID_CHECKOUT_PATH = os.path.join(os.pardir, 'android_repo') |
| 21 ANDROID_REPO_URL = ('https://googleplex-android.googlesource.com/a/platform/' | 21 ANDROID_REPO_URL = ('https://googleplex-android.googlesource.com/a/platform/' |
| 22 'manifest') | 22 'manifest') |
| 23 GIT_COOKIE_AUTHDAEMON = os.path.join(os.path.expanduser('~'), 'skia-repo', | 23 GIT_COOKIE_AUTHDAEMON = os.path.join(os.path.expanduser('~'), 'skia-repo', |
| 24 'gcompute-tools', 'git-cookie-authdaemon') | 24 'gcompute-tools', 'git-cookie-authdaemon') |
| 25 REPO_URL = 'http://commondatastorage.googleapis.com/git-repo-downloads/repo' | 25 REPO_URL = 'http://commondatastorage.googleapis.com/git-repo-downloads/repo' |
| 26 REPO = os.path.join(os.path.expanduser('~'), 'bin', 'repo') | 26 REPO = os.path.join(os.path.expanduser('~'), 'bin', 'repo') |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 shell_utils.run(['chmod', 'a+x', REPO]) | 62 shell_utils.run(['chmod', 'a+x', REPO]) |
| 63 | 63 |
| 64 with GitAuthenticate(): | 64 with GitAuthenticate(): |
| 65 shell_utils.run([REPO, 'init', '-u', ANDROID_REPO_URL, '-g', | 65 shell_utils.run([REPO, 'init', '-u', ANDROID_REPO_URL, '-g', |
| 66 'all,-notdefault,-darwin', '-b', 'master-skia']) | 66 'all,-notdefault,-darwin', '-b', 'master-skia']) |
| 67 shell_utils.run([REPO, 'sync', '-j32']) | 67 shell_utils.run([REPO, 'sync', '-j32']) |
| 68 | 68 |
| 69 | 69 |
| 70 if '__main__' == __name__: | 70 if '__main__' == __name__: |
| 71 sys.exit(BuildStep.RunBuildStep(SyncAndroid)) | 71 sys.exit(BuildStep.RunBuildStep(SyncAndroid)) |
| OLD | NEW |