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

Side by Side Diff: third_party/mojo/src/mojo/public/tools/download_network_service.py

Issue 1157573002: Revert "Update mojo sdk to rev 1dc8a9a5db73d3718d99917fadf31f5fb2ebad4f" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 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 import argparse 6 import argparse
7 import os 7 import os
8 import sys 8 import sys
9 import tempfile 9 import tempfile
10 import zipfile 10 import zipfile
11 11
12 _PLATFORMS = ["linux-x64", "android-arm"] 12 _PLATFORMS = ["linux-x64", "android-arm"]
13 _APPS = ["network_service", "network_service_apptests"] 13 _APPS = ["network_service", "network_service_apptests"]
14 _CURRENT_PATH = os.path.dirname(os.path.realpath(__file__)) 14 _CURRENT_PATH = os.path.dirname(os.path.realpath(__file__))
15 sys.path.insert(0, os.path.join(_CURRENT_PATH, "pylib")) 15 sys.path.insert(0, os.path.join(_CURRENT_PATH, "pylib"))
16 import gs 16 import gs
17 17
18 if not sys.platform.startswith("linux"):
19 print "Not supported for your platform"
20 sys.exit(0)
21
18 script_dir = os.path.dirname(os.path.realpath(__file__)) 22 script_dir = os.path.dirname(os.path.realpath(__file__))
19 23
20 24
21 def download_app(app, version, tools_directory): 25 def download_app(app, version, tools_directory):
22 prebuilt_directory = os.path.join(script_dir, "prebuilt/%s" % app) 26 prebuilt_directory = os.path.join(script_dir, "prebuilt/%s" % app)
23 stamp_path = os.path.join(prebuilt_directory, "VERSION") 27 stamp_path = os.path.join(prebuilt_directory, "VERSION")
24 28
25 try: 29 try:
26 with open(stamp_path) as stamp_file: 30 with open(stamp_path) as stamp_file:
27 current_version = stamp_file.read().strip() 31 current_version = stamp_file.read().strip()
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 version = version_file.read().strip() 80 version = version_file.read().strip()
77 81
78 for app in _APPS: 82 for app in _APPS:
79 download_app(app, version, args.tools_directory) 83 download_app(app, version, args.tools_directory)
80 84
81 return 0 85 return 0
82 86
83 87
84 if __name__ == "__main__": 88 if __name__ == "__main__":
85 sys.exit(main()) 89 sys.exit(main())
OLDNEW
« no previous file with comments | « third_party/mojo/src/mojo/public/tools/dart_pkg.py ('k') | third_party/mojo/src/mojo/public/tools/git/dart_pub_get.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698