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

Side by Side Diff: go/src/infra/tools/cr/cmd/firstrun.go

Issue 1905233002: Add framework for basic cr command (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 8 months 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 | « go/deps.yaml ('k') | go/src/infra/tools/cr/cmd/root.go » ('j') | 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 2016 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 /*
6 Generally only executed once on a given machine, the firstrun command installs
7 the cr tool, prepares a space for it to install modules, and adds it to $PATH.
8 */
9
10 package cmd
11
12 import (
13 "fmt"
14
15 "github.com/spf13/cobra"
16 )
17
18 var firstrunCmd = &cobra.Command{
19 Use: "firstrun",
20 Short: "Install the cr tool and intelligently add it to $PATH",
21 Long: `Install the cr too and intelligently add it to $PATH.
22
23 Given a path to a desired install directory, it takes ownership of that
24 directory, sets it up to support installation of modules, and adds the
25 directory to $PATH (by prompting to modify e.g. the registry or .bashrc).
26
27 The firstrun command is intended to only be run once, when first
28 installing the cr tool.`,
29 Run: func(cmd *cobra.Command, args []string) {
30 fmt.Println("firstrun called")
31 },
32 }
33
34 func init() {
35 RootCmd.AddCommand(firstrunCmd)
36 }
OLDNEW
« no previous file with comments | « go/deps.yaml ('k') | go/src/infra/tools/cr/cmd/root.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698