This commit is contained in:
abs3nt 2023-02-27 23:46:21 -08:00
parent 174fd37e1b
commit a4ce86f31d
2 changed files with 35 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
converter

33
Makefile Normal file
View File

@ -0,0 +1,33 @@
pkgname := converter
build: ${pkgname}
${pkgname}: $(shell find . -name '*.go')
go build -o ${pkgname} .
completions:
mkdir -p completions
./${pkgname} completion zsh > completions/_${pkgname}
./${pkgname} completion bash > completions/${pkgname}
./${pkgname} completion fish > completions/${pkgname}.fish
run:
go run main.go
tidy:
go mod tidy
clean:
rm -f ${pkgname}
rm -rf completions
uninstall:
rm -f /usr/bin/${pkgname}
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:
cp ${pkgname} /usr/bin
${pkgname} completion zsh > /usr/share/zsh/site-functions/_${pkgname}
${pkgname} completion bash > /usr/share/bash-completion/completions/${pkgname}
${pkgname} completion fish > /usr/share/fish/vendor_completions.d/${pkgname}.fish