Home | History | Annotate | Download | only in cr

Lines Matching defs:cr

5 """Chromium cr tool main module.
12 import cr
18 """Chromium cr tool main function.
20 This is the main entry point of the cr tool, it finds and loads all the
25 # Add the users plugin dir to the cr.auto.user package scan
26 user_path = os.path.expanduser(os.path.join('~', '.config', 'cr'))
27 cr.auto.user.__path__.append(user_path)
29 cr.loader.Scan()
32 with cr.base.context.Create(
38 cr.base.client.DetectClient()
41 for command in cr.Command.Plugins():
42 cr.context.AddSubParser(command)
45 if cr.context.autocompleting:
47 cr.autocomplete.Complete()
50 cr.context.ParseArgs(True)
51 cr.plugin.Activate()
53 command = cr.Command.GetActivePlugin()
58 cr.plugin.Activate()
60 found_build_dir = cr.base.client.LoadConfig()
62 cr.context.ParseArgs()
63 cr.plugin.Activate()
66 command = cr.Command.GetActivePlugin()
68 if cr.context.verbose >= 3:
69 cr.context.DumpValues(cr.context.verbose > 3)
71 print cr.context.Substitute('No command specified.')
75 if not cr.context.Find('CR_OUT_FULL'):
76 print cr.context.Substitute(
77 'No build directory specified. Please use cr init to make one.')
79 print cr.context.Substitute(
82 if cr.context.Find('CR_VERSION') != cr.base.client.VERSION:
83 print cr.context.Substitute(
84 'Build {CR_BUILD_DIR} is for the wrong version of cr')
85 print 'Please run cr init to reset it'
87 cr.Platform.Prepare()
88 if cr.context.verbose >= 1:
89 print cr.context.Substitute(
90 'Running cr ' + command.name + ' for {CR_BUILD_DIR}')