blob: 48bddfea53ca83e4cc2904e9d9aae125148f407e (
plain)
1
2
3
4
5
6
7
8
|
#!/bin/sh -e
export GOPATH=$PWD/gopath
trap "go clean -modcache" EXIT INT
go mod vendor
date=$(date -u +%Y-%m-%dT%H:%M:%SZ)
CGO_ENABLED=0 go build -ldflags="-X 'main.version=$2' -X 'main.commit=null' -X 'main.builtBy=cpt' -X 'main.date=$date'"
install -Dm755 chezmoi "$1/usr/bin/chezmoi"
|