forked from twpayne/chezmoi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
39 lines (33 loc) · 1 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//go:generate go run ./internal/generate-assets -o cmd/docs.gen.go -tags=!noembeddocs docs/CHANGES.md docs/CONTRIBUTING.md docs/FAQ.md docs/HOWTO.md docs/INSTALL.md docs/MEDIA.md docs/QUICKSTART.md docs/REFERENCE.md
//go:generate go run ./internal/generate-assets -o cmd/templates.gen.go assets/templates/COMMIT_MESSAGE.tmpl
//go:generate go run ./internal/generate-helps -o cmd/helps.gen.go -i docs/REFERENCE.md
//go:generate go run . completion bash -o completions/chezmoi-completion.bash
//go:generate go run . completion fish -o completions/chezmoi.fish
//go:generate go run . completion zsh -o completions/chezmoi.zsh
package main
import (
"fmt"
"os"
"github.com/twpayne/chezmoi/cmd"
)
var (
version = ""
commit = ""
date = ""
builtBy = ""
)
func run() error {
cmd.VersionStr = version
cmd.Commit = commit
cmd.Date = date
cmd.BuiltBy = builtBy
return cmd.Execute()
}
func main() {
if err := run(); err != nil {
if s := err.Error(); s != "" {
fmt.Printf("chezmoi: %s\n", s)
}
os.Exit(1)
}
}