makefile
This commit is contained in:
parent
174fd37e1b
commit
a4ce86f31d
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
converter
|
||||
|
33
Makefile
Normal file
33
Makefile
Normal 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
|
Loading…
Reference in New Issue
Block a user