~sergiusens/snappy/uflash

« back to all changes in this revision

Viewing changes to cmd/snappy/cmd_install.go

  • Committer: Sergio Schvezov
  • Date: 2015-07-30 18:46:25 UTC
  • mfrom: (578.1.3 inhibitMore)
  • Revision ID: sergio.schvezov@canonical.com-20150730184625-an1rmlp20eztkxrp
Merged inhibitMore into uflash.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
)
32
32
 
33
33
type cmdInstall struct {
34
 
        AllowUnauthenticated bool `long:"allow-unauthenticated" description:"Install snaps even if the signature can not be verified."`
35
 
        DisableGC            bool `long:"no-gc" description:"Do not clean up old versions of the package."`
 
34
        AllowUnauthenticated bool `long:"allow-unauthenticated"`
 
35
        DisableGC            bool `long:"no-gc"`
36
36
        Positional           struct {
37
 
                PackageName string `positional-arg-name:"package name" description:"The Package to install (name or path)"`
38
 
                ConfigFile  string `positional-arg-name:"config file" description:"The configuration for the given install"`
 
37
                PackageName string `positional-arg-name:"package name"`
 
38
                ConfigFile  string `positional-arg-name:"config file"`
39
39
        } `positional-args:"yes"`
40
40
}
41
41
 
42
42
func init() {
43
 
        _, err := parser.AddCommand("install",
 
43
        arg, err := parser.AddCommand("install",
44
44
                i18n.G("Install a snap package"),
45
45
                i18n.G("Install a snap package"),
46
46
                &cmdInstall{})
47
47
        if err != nil {
48
48
                logger.Panicf("Unable to install: %v", err)
49
49
        }
 
50
        addOptionDescription(arg, "allow-unauthenticated", i18n.G("Install snaps even if the signature can not be verified."))
 
51
        addOptionDescription(arg, "no-gc", i18n.G("Do not clean up old versions of the package."))
 
52
        addOptionDescription(arg, "package name", i18n.G("The Package to install (name or path)"))
 
53
        addOptionDescription(arg, "config file", i18n.G("The configuration for the given install"))
50
54
}
51
55
 
52
56
func (x *cmdInstall) Execute(args []string) error {