Chromium Code Reviews
|
| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/usr/bin/python | |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 3 # Use of this source code is governed by a BSD-style license that can be | |
| 4 # found in the LICENSE file. | |
| 5 | |
| 6 """Shim to run nacl toolchain download script only if there is a nacl dir.""" | |
| 7 | |
| 8 import os | |
| 9 import sys | |
| 10 | |
| 11 | |
| 12 if __name__ == '__main__': | |
| 13 script_dir = os.path.dirname(os.path.abspath(__file__)) | |
|
noelallen_use_chromium
2011/08/17 01:39:45
Std convention is to call main, and make this it's
bradn
2011/08/17 02:26:25
Done.
| |
| 14 src_dir = os.path.dirname(script_dir) | |
| 15 nacl_dir = os.path.join(src_dir, 'native_client') | |
| 16 nacl_build_dir = os.path.join(nacl_dir, 'build') | |
| 17 download_script = os.path.join(nacl_build_dir, 'download_toolchains.py') | |
| 18 if not os.path.exists(download_script): | |
| 19 print 'No native_client directory, skipping toolchain download.' | |
|
noelallen_use_chromium
2011/08/17 01:39:45
Plz change to '%s' does not exist and print the fi
bradn
2011/08/17 02:26:25
Done.
| |
| 20 sys.exit(0) | |
| 21 sys.path.insert(0, nacl_build_dir) | |
| 22 import download_toolchains | |
| 23 download_toolchains.Main() | |
| OLD | NEW |