diff options
| author | Robert Günzler <r@gnzler.io> | 2025-01-07 16:10:26 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2025-01-13 13:59:00 +0100 |
| commit | 92943c5c4cb1e867fb2a3e9c2b5611485b41a899 (patch) | |
| tree | 43c4c99365d4b0a2ce385e0d9dd6a21786ba22ab | |
| parent | bc8a4821a273c0da88cefb665d7d09b24a278ab7 (diff) | |
| download | site-92943c5c4cb1e867fb2a3e9c2b5611485b41a899.tar.gz | |
add edit helpers to makefile
Signed-off-by: Robert Günzler <r@gnzler.io>
| -rw-r--r-- | edit.mk | 10 | ||||
| -rw-r--r-- | makefile | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/edit.mk b/edit.mk new file mode 100644 index 0000000..4d1fbe1 --- /dev/null +++ b/edit.mk @@ -0,0 +1,10 @@ +commit: + @ git add -v -- $(shell git ls-files -dmo site/ links/ media/ src/inc/ | fzf -m) + @ git commit -m "% update site" -esS + +edit: + @ ${EDITOR} src/inc/$(shell pushd src/inc >/dev/null && git ls-files -c . | fzf -m --bind=ctrl-c:accept-or-print-query) + @ ${MAKE} gen + @ ${MAKE} commit + +.PHONY: commit edit diff --git a/makefile b/makefile index 8257661..47f98c9 100644 --- a/makefile +++ b/makefile @@ -43,3 +43,4 @@ watch-and-serve: .PHONY: all clean serve watch watch-and-serve include webdeploy.mk +include edit.mk |