This commit is contained in:
abs3nt 2023-01-18 21:37:32 -08:00
parent 673fa3f62f
commit 3b0c59622d

View File

@ -1,14 +1,13 @@
build: gospt build: gospt
gospt: $(shell find . -name '*.go') gospt: $(shell find . -name '*.go')
mkdir -p bin
go build -o gospt . go build -o gospt .
completions: completions:
mkdir -p completions mkdir -p completions
bin/gospt completion zsh > completions/_gospt gospt completion zsh > completions/_gospt
bin/gospt completion bash > completions/gospt gospt completion bash > completions/gospt
bin/gospt completion fish > completions/gospt.fish gospt completion fish > completions/gospt.fish
run: run:
go run main.go go run main.go
@ -17,16 +16,17 @@ tidy:
go mod tidy go mod tidy
clean: clean:
rm -rf bin rm -f gospt
rm -rf gospt
rm -rf completions rm -rf completions
uninstall: uninstall:
rm -f /usr/bin/gospt rm -f /usr/bin/gospt
rm /usr/share/zsh/site-functions/_gospt rm -f /usr/share/zsh/site-functions/_gospt
rm -f /usr/share/bash-completion/completions/gospt
rm -f /usr/share/fish/vendor_completions.d/gospt.fish
install: install:
cp gospt /usr/bin cp gospt /usr/bin
cp completions/_gospt /usr/share/zsh/site-functions/_gospt gospt completion zsh > /usr/share/zsh/site-functions/_gospt
cp completions/gospt /usr/share/bash-completion/completions/gospt gospt completion bash > /usr/share/bash-completion/completions/gospt
cp completions/gospt.fish /usr/share/fish/vendor_completions.d/gospt.fish gospt completion fish > /usr/share/fish/vendor_completions.d/gospt.fish