2023-03-04 22:22:03 +00:00
|
|
|
pkgname := haunt
|
|
|
|
build: ${pkgname}
|
|
|
|
|
|
|
|
${pkgname}: $(shell find . -name '*.go')
|
|
|
|
mkdir -p bin
|
|
|
|
go build -o bin/${pkgname} .
|
|
|
|
|
2023-03-06 18:39:51 +00:00
|
|
|
decode:
|
2023-03-07 01:49:03 +00:00
|
|
|
go run ./hack/unpack/main.go
|
2023-03-06 18:39:51 +00:00
|
|
|
|
|
|
|
pack-site:
|
|
|
|
go-bindata -pkg haunt -o src/haunt/bindata.go -fs assets/...
|
|
|
|
|
2023-03-04 22:22:03 +00:00
|
|
|
completions:
|
|
|
|
mkdir -p completions
|
|
|
|
./bin/${pkgname} completion zsh > completions/_${pkgname}
|
|
|
|
./bin/${pkgname} completion bash > completions/${pkgname}
|
|
|
|
./bin/${pkgname} completion fish > completions/${pkgname}.fish
|
|
|
|
|
|
|
|
run:
|
|
|
|
go run main.go
|
|
|
|
|
|
|
|
tidy:
|
|
|
|
go mod tidy
|
|
|
|
|
|
|
|
clean:
|
2023-03-06 18:39:51 +00:00
|
|
|
rm -rf bin
|
2023-03-04 22:22:03 +00:00
|
|
|
rm -rf completions
|
2023-03-06 18:39:51 +00:00
|
|
|
rm -rf assets
|
2023-03-04 22:22:03 +00:00
|
|
|
|
|
|
|
uninstall:
|
2023-03-08 23:14:45 +00:00
|
|
|
rm -f /usr/local/bin/${pkgname}
|
2023-03-04 22:22:03 +00:00
|
|
|
rm -f /usr/share/zsh/site-functions/_${pkgname}
|
|
|
|
rm -f /usr/share/bash-completion/completions/${pkgname}
|
|
|
|
rm -f /usr/share/fish/vendor_completions.d/${pkgname}.fish
|
|
|
|
|
|
|
|
install:
|
2023-03-08 23:14:45 +00:00
|
|
|
cp bin/${pkgname} /usr/local/bin
|
2023-03-04 22:22:03 +00:00
|
|
|
bin/${pkgname} completion zsh > /usr/share/zsh/site-functions/_${pkgname}
|
|
|
|
bin/${pkgname} completion bash > /usr/share/bash-completion/completions/${pkgname}
|
|
|
|
bin/${pkgname} completion fish > /usr/share/fish/vendor_completions.d/${pkgname}.fish
|