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

Unified Diff: frog/scripts/bootstrap/frog_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, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: frog/scripts/bootstrap/frog_bootstrap_wrapper.py
===================================================================
--- frog/scripts/bootstrap/frog_bootstrap_wrapper.py (revision 1968)
+++ frog/scripts/bootstrap/frog_bootstrap_wrapper.py (working copy)
@@ -8,17 +8,26 @@
HOME = os.path.dirname(os.path.realpath(__file__))
HOME = os.path.join(HOME, os.pardir, os.pardir)
-sys.path.append(HOME)
-import frog
+END_SCRIPT = '''
+VM = '%s'
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
+'''
def main(args):
- js_out = args[1]
+ product_dir = args[1]
+ vm = os.path.join(product_dir, 'dart')
+ frog = os.path.join(product_dir, 'frog', 'bin', 'frog')
# TODO(ngeoffray): Create a script that will run the VM in production mode.
# if js_out.find('Release') != -1:
shutil.copy(os.path.join(HOME, 'scripts', 'bootstrap', 'frog_wrapper.py'),
- js_out)
- os.chmod(js_out, stat.S_IXUSR | stat.S_IXGRP | stat.S_IRUSR |
+ frog)
+
+ with open(frog, 'a+') as f:
+ f.write(END_SCRIPT % vm)
+
+ os.chmod(frog, stat.S_IXUSR | stat.S_IXGRP | stat.S_IRUSR |
stat.S_IRGRP | stat.S_IWUSR)
return 0
« frog/frog.py ('K') | « frog/frog.py ('k') | frog/scripts/bootstrap/frog_wrapper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698