| OLD | NEW |
| (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 } |
| OLD | NEW |