-
Notifications
You must be signed in to change notification settings - Fork 498
/
main.go
38 lines (31 loc) · 1015 Bytes
/
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
//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 powershell -o completions/chezmoi.ps1
//go:generate go run . completion zsh -o completions/chezmoi.zsh
//go:generate go run ./internal/cmds/generate-install.sh -o assets/scripts/install.sh
//go:generate go run ./internal/cmds/generate-install.sh -b .local/bin -o assets/scripts/install-local-bin.sh
package main
import (
"os"
"go.uber.org/automaxprocs/maxprocs"
_ "golang.org/x/crypto/x509roots/fallback" // Embed fallback X.509 trusted roots
"github.com/twpayne/chezmoi/v2/internal/cmd"
)
var (
version string
commit string
date string
builtBy string
)
func main() {
// Set GOMAXPROCS to match the Linux CPU quota.
_, _ = maxprocs.Set()
if exitCode := cmd.Main(cmd.VersionInfo{
Version: version,
Commit: commit,
Date: date,
BuiltBy: builtBy,
}, os.Args[1:]); exitCode != 0 {
os.Exit(exitCode)
}
}