add completion generation to makefile
This commit is contained in:
parent
2c0c3320ee
commit
50d64368f9
2 changed files with 9 additions and 2 deletions
7
Makefile
7
Makefile
|
@ -2,7 +2,7 @@
|
|||
.PHONY: lint
|
||||
lint: lint.py lint.sh
|
||||
|
||||
msg = $(call tprint,{a.b_magenta}==>{a.end}{a.bold} $(1){a.end})
|
||||
msg = $(if tprint,$(call tprint,{a.b_magenta}==>{a.end}{a.bold} $(1){a.end}),@echo '==> $(1)')
|
||||
|
||||
## lint.py | lint python files
|
||||
.PHONY: lint.py
|
||||
|
@ -16,6 +16,11 @@ lint.sh:
|
|||
$(call msg,Linting Shell Files)
|
||||
@shfmt -s -w $(shell shfmt -f .)
|
||||
|
||||
## completions | generate completion scripts
|
||||
completions:
|
||||
$(call msg,Generating Completions)
|
||||
@./lib/completions/update.sh
|
||||
|
||||
## db, d-build | build docker image
|
||||
.PHONY: db d-build
|
||||
db d-build:
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
CURDIR=${0:a:h}
|
||||
|
||||
gen() {
|
||||
if is-executable $1; then
|
||||
echo "$1 updated"
|
||||
"$@" | sed "s#$HOME#\$HOME#g" >"_$argv[1]"
|
||||
"$@" | sed "s#$HOME#\$HOME#g" > $CURDIR/"_$argv[1]"
|
||||
else
|
||||
echo "skipping $1"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue