2024-01-08 22:37:31 +00:00
|
|
|
target:
|
2024-01-11 22:31:41 +00:00
|
|
|
@echo "Select target directory"
|
|
|
|
@echo $$(find . -name bashly.yml | sed -e 's/.\///' -e 's/\/.*//' | $$DMENU) > .target
|
2024-01-08 22:37:31 +00:00
|
|
|
|
|
|
|
get-target:
|
|
|
|
$(eval TARGET := $(shell cat .target))
|
|
|
|
|
|
|
|
output-dir:
|
|
|
|
mkdir -p ./output
|
|
|
|
|
|
|
|
generate: get-target output-dir
|
|
|
|
BASHLY_SOURCE_DIR=$(TARGET) bashly generate
|
2024-01-11 22:31:41 +00:00
|
|
|
|
|
|
|
generate-upgrade: get-target output-dir
|
|
|
|
BASHLY_SOURCE_DIR=$(TARGET) bashly generate --upgrade
|
|
|
|
|
|
|
|
completions: generate-upgrade
|
2024-01-08 22:37:31 +00:00
|
|
|
BASHLY_SOURCE_DIR=$(TARGET) bashly add --force completions_script ./output/_$(TARGET)
|
|
|
|
|
2024-01-11 22:31:41 +00:00
|
|
|
docs: generate
|
|
|
|
BASHLY_SOURCE_DIR=$(TARGET) bashly render :mandoc ./output/man1
|
|
|
|
|
|
|
|
deploy: completions docs
|
2024-01-08 22:37:31 +00:00
|
|
|
cp -f ./output/$(TARGET) ~/.local/bin/
|
|
|
|
cp -f ./output/_$(TARGET) ~/.config/completionsrc.d/
|
2024-01-11 22:31:41 +00:00
|
|
|
cp -f ./output/man1/$(TARGET)*.1 ~/.local/share/man/man1/
|