bootstrap.py also imports it
This commit is contained in:
parent
0f29d9f30f
commit
da900b3094
1 changed files with 5 additions and 9 deletions
|
@ -4,8 +4,9 @@ import argparse
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL
|
from lib.config import LIBCHROMIUMCONTENT_COMMIT, BASE_URL, \
|
||||||
from lib.util import execute_stdout, scoped_cwd, enable_verbose_execute
|
enable_verbose_mode, is_verbose_mode
|
||||||
|
from lib.util import execute_stdout, scoped_cwd
|
||||||
|
|
||||||
|
|
||||||
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
|
@ -14,17 +15,12 @@ PYTHON_26_URL = 'https://chromium.googlesource.com/chromium/deps/python_26'
|
||||||
NPM = 'npm.cmd' if sys.platform in ['win32', 'cygwin'] else 'npm'
|
NPM = 'npm.cmd' if sys.platform in ['win32', 'cygwin'] else 'npm'
|
||||||
|
|
||||||
|
|
||||||
verbose_mode = False
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
os.chdir(SOURCE_ROOT)
|
os.chdir(SOURCE_ROOT)
|
||||||
|
|
||||||
args = parse_args()
|
args = parse_args()
|
||||||
if args.verbose:
|
if args.verbose:
|
||||||
enable_verbose_execute()
|
enable_verbose_mode()
|
||||||
global verbose_mode
|
|
||||||
verbose_mode = True
|
|
||||||
update_submodules()
|
update_submodules()
|
||||||
update_node_modules('.')
|
update_node_modules('.')
|
||||||
update_atom_modules('spec')
|
update_atom_modules('spec')
|
||||||
|
@ -66,7 +62,7 @@ def bootstrap_brightray(url):
|
||||||
|
|
||||||
def update_node_modules(dirname):
|
def update_node_modules(dirname):
|
||||||
with scoped_cwd(dirname):
|
with scoped_cwd(dirname):
|
||||||
if verbose_mode:
|
if is_verbose_mode():
|
||||||
execute_stdout([NPM, 'install', '--verbose'])
|
execute_stdout([NPM, 'install', '--verbose'])
|
||||||
else:
|
else:
|
||||||
execute_stdout([NPM, 'install'])
|
execute_stdout([NPM, 'install'])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue