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

Side by Side Diff: tools/cr/cr/commands/install.py

Issue 99393002: [cr tool] Adding the install command (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix apostrophe Created 7 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 """A module for the install command."""
6
7 import cr
8
9
10 class InstallCommand(cr.Command):
11 """The implementation of the install command.
12
13 This first uses Builder.Build to bring the target up to date, and then
14 installs it using Installer.Reinstall.
15 The builder installs its command line arguments, and you can use those to
16 select which builder is used. Selecting the skip builder
17 (using --builder=skip) bypasses the build stage.
18 """
19
20 def __init__(self):
21 super(InstallCommand, self).__init__()
22 self.help = 'Install a binary'
23
24 def AddArguments(self, subparsers):
25 parser = super(InstallCommand, self).AddArguments(subparsers)
26 cr.Builder.AddArguments(self, parser)
27 cr.Installer.AddArguments(self, parser)
28 cr.Target.AddArguments(self, parser, allow_multiple=True)
29 self.ConsumeArgs(parser, 'the installer')
30 return parser
31
32 def Run(self, context):
33 targets = cr.Target.GetTargets(context)
34 if not cr.Installer.Skipping(context):
35 cr.Builder.Build(context, targets, [])
36 cr.Installer.Reinstall(context, targets, context.remains)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698