Only create config.gypi if it doesn't exist.
authorCheng Zhao <zcbenz@gmail.com>
Tue, 2 Jul 2013 01:31:43 +0000 (09:31 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 2 Jul 2013 01:31:43 +0000 (09:31 +0800)
Otherwise every call of bootstrap would trigger recompilation of some
files.

script/bootstrap.py

index a90df1a..73bae35 100755 (executable)
@@ -70,8 +70,9 @@ def update_win32_python():
 
 def touch_config_gypi():
   config_gypi = os.path.join(SOURCE_ROOT, 'vendor', 'node', 'config.gypi')
-  with open(config_gypi, 'w+') as f:
-    f.truncate(0)
+  if not os.path.exists(config_gypi):
+    with open(config_gypi, 'w+') as f:
+      f.truncate(0)
 
 
 def update_atom_shell():