| 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
|
|
|
|
|