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

Side by Side Diff: frog/scripts/bootstrap/frogsh_bootstrap_wrapper.py

Issue 8773005: Get rid of guessing the VM location in frog.py. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years 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 | « frog/scripts/bootstrap/frog_wrapper.py ('k') | tools/build.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2011 Google Inc. All Rights Reserved. 1 # Copyright 2011 Google Inc. All Rights Reserved.
2 2
3 import os 3 import os
4 import shutil 4 import shutil
5 import stat 5 import stat
6 import sys 6 import sys
7 7
8 HOME = os.path.dirname(os.path.realpath(__file__)) 8 HOME = os.path.dirname(os.path.realpath(__file__))
9 HOME = os.path.join(HOME, os.pardir, os.pardir) 9 HOME = os.path.join(HOME, os.pardir, os.pardir)
10 10
11 sys.path.append(HOME) 11 sys.path.append(HOME)
12 import frog 12 import frog
13 13
14 def main(args): 14 def main(args):
15 for arg in args: 15 product_dir = args[1]
16 index = arg.find('--out=') 16 js_out = os.path.join(product_dir, 'frog', 'bin', 'frogsh')
17 if index != -1: 17 vm = os.path.join(product_dir, 'dart')
18 js_out = arg[6:len(arg)]; 18 frog_args = ['frog.py', '--vm=' + vm, '--', '--out=' + js_out, 'frog.dart']
19 19
20 # TODO(ngeoffray): Compile frogsh without checks integrated. 20 # TODO(ngeoffray): Compile frogsh without checks integrated.
21 # if js_out.find('Release') != -1: 21 # if js_out.find('Release') != -1:
22 exit_code = frog.main(args) 22 exit_code = frog.main(frog_args)
23 if exit_code: 23 if exit_code:
24 return exit_code 24 return exit_code
25 25
26 os.chmod(js_out, stat.S_IXUSR | stat.S_IXGRP | stat.S_IRUSR | 26 os.chmod(js_out, stat.S_IXUSR | stat.S_IXGRP | stat.S_IRUSR |
27 stat.S_IRGRP | stat.S_IWUSR) 27 stat.S_IRGRP | stat.S_IWUSR)
28 return exit_code 28 return exit_code
29 29
30 30
31 if __name__ == '__main__': 31 if __name__ == '__main__':
32 sys.exit(main(sys.argv)) 32 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « frog/scripts/bootstrap/frog_wrapper.py ('k') | tools/build.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698