Add docs make-target
This commit is contained in:
parent
b5eaaead9b
commit
8eef9ffb24
2 changed files with 13 additions and 6 deletions
18
Makefile
18
Makefile
|
@ -1,7 +1,6 @@
|
|||
target:
|
||||
@echo "Enter target directory:"
|
||||
@read target; \
|
||||
echo $$target > .target
|
||||
@echo "Select target directory"
|
||||
@echo $$(find . -name bashly.yml | sed -e 's/.\///' -e 's/\/.*//' | $$DMENU) > .target
|
||||
|
||||
get-target:
|
||||
$(eval TARGET := $(shell cat .target))
|
||||
|
@ -11,10 +10,17 @@ output-dir:
|
|||
|
||||
generate: get-target output-dir
|
||||
BASHLY_SOURCE_DIR=$(TARGET) bashly generate
|
||||
|
||||
completions: generate
|
||||
|
||||
generate-upgrade: get-target output-dir
|
||||
BASHLY_SOURCE_DIR=$(TARGET) bashly generate --upgrade
|
||||
|
||||
completions: generate-upgrade
|
||||
BASHLY_SOURCE_DIR=$(TARGET) bashly add --force completions_script ./output/_$(TARGET)
|
||||
|
||||
deploy: completions
|
||||
docs: generate
|
||||
BASHLY_SOURCE_DIR=$(TARGET) bashly render :mandoc ./output/man1
|
||||
|
||||
deploy: completions docs
|
||||
cp -f ./output/$(TARGET) ~/.local/bin/
|
||||
cp -f ./output/_$(TARGET) ~/.config/completionsrc.d/
|
||||
cp -f ./output/man1/$(TARGET)*.1 ~/.local/share/man/man1/
|
||||
|
|
|
@ -2,5 +2,6 @@ with import <nixpkgs> {};
|
|||
mkShell {
|
||||
nativeBuildInputs = [
|
||||
bashly
|
||||
pandoc
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue