diff options
author | Michael Muré <batolettre@gmail.com> | 2019-03-01 23:17:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-01 23:17:57 +0100 |
commit | 7260ca05bc3588c0572887a7d8f1b897c7fc13da (patch) | |
tree | 66854358df3cb9de651f7688556ec5a4b8ab1868 /doc/gen_manpage.go | |
parent | 0aefae6fcca5786f2c898029c3d6282f760f2c63 (diff) | |
parent | b6bed784e5664819250aac20b2b9690879ee6ab1 (diff) | |
download | git-bug-7260ca05bc3588c0572887a7d8f1b897c7fc13da.tar.gz |
Merge pull request #89 from MichaelMure/identity
WIP identity in git
Diffstat (limited to 'doc/gen_manpage.go')
-rw-r--r-- | doc/gen_manpage.go | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/doc/gen_manpage.go b/doc/gen_manpage.go index 4147d915..0c7a501a 100644 --- a/doc/gen_manpage.go +++ b/doc/gen_manpage.go @@ -7,6 +7,7 @@ import ( "log" "os" "path" + "path/filepath" "github.com/MichaelMure/git-bug/commands" "github.com/spf13/cobra/doc" @@ -14,7 +15,7 @@ import ( func main() { cwd, _ := os.Getwd() - filepath := path.Join(cwd, "doc", "man") + dir := path.Join(cwd, "doc", "man") header := &doc.GenManHeader{ Title: "GIT-BUG", @@ -24,7 +25,17 @@ func main() { fmt.Println("Generating manpage ...") - err := doc.GenManTree(commands.RootCmd, header, filepath) + files, err := filepath.Glob(dir + "/*.1") + if err != nil { + log.Fatal(err) + } + for _, f := range files { + if err := os.Remove(f); err != nil { + log.Fatal(err) + } + } + + err = doc.GenManTree(commands.RootCmd, header, dir) if err != nil { log.Fatal(err) } |