Add docs make-target

This commit is contained in:
Tobias Reisinger 2024-01-11 23:31:41 +01:00
parent b5eaaead9b
commit 8eef9ffb24
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
2 changed files with 13 additions and 6 deletions

View file

@ -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/

View file

@ -2,5 +2,6 @@ with import <nixpkgs> {};
mkShell {
nativeBuildInputs = [
bashly
pandoc
];
}