aboutsummaryrefslogtreecommitdiff
path: root/community/chezmoi/build
diff options
context:
space:
mode:
Diffstat (limited to 'community/chezmoi/build')
-rwxr-xr-xcommunity/chezmoi/build8
1 files changed, 8 insertions, 0 deletions
diff --git a/community/chezmoi/build b/community/chezmoi/build
new file mode 100755
index 00000000..02ccd498
--- /dev/null
+++ b/community/chezmoi/build
@@ -0,0 +1,8 @@
+#!/bin/sh -e
+
+export GOPATH=$PWD/gopath
+trap "go clean -modcache" EXIT INT
+go mod vendor
+
+CGO_ENABLED=0 go build -ldflags="-X 'main.version=$2'"
+install -Dm755 chezmoi "$1/usr/bin/chezmoi"