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: target:
@echo "Enter target directory:" @echo "Select target directory"
@read target; \ @echo $$(find . -name bashly.yml | sed -e 's/.\///' -e 's/\/.*//' | $$DMENU) > .target
echo $$target > .target
get-target: get-target:
$(eval TARGET := $(shell cat .target)) $(eval TARGET := $(shell cat .target))
@ -12,9 +11,16 @@ output-dir:
generate: get-target output-dir generate: get-target output-dir
BASHLY_SOURCE_DIR=$(TARGET) bashly generate 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) 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) ~/.local/bin/
cp -f ./output/_$(TARGET) ~/.config/completionsrc.d/ 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 { mkShell {
nativeBuildInputs = [ nativeBuildInputs = [
bashly bashly
pandoc
]; ];
} }