...
1 package main
2
3 import (
4 "github.com/flynn/go-docopt"
5 "github.com/theupdateframework/go-tuf"
6 )
7
8 func init() {
9 register("init", cmdInit, `
10 usage: tuf init [--consistent-snapshot=false]
11
12 Initialize a new repository.
13
14 This is only required if the repository should not generate consistent
15 snapshots (i.e. by passing "--consistent-snapshot=false"). If consistent
16 snapshots should be generated, the repository will be implicitly
17 initialized to do so when generating keys.
18 `)
19 }
20
21 func cmdInit(args *docopt.Args, repo *tuf.Repo) error {
22 return repo.Init(args.String["--consistent-snapshot"] != "false")
23 }
24
View as plain text