autostart-manage/Makefile

26 lines
766 B
Makefile

target:
@echo "Select target directory"
@echo $$(find . -name bashly.yml | sed -e 's/.\///' -e 's/\/.*//' | $$DMENU) > .target
get-target:
$(eval TARGET := $(shell cat .target))
output-dir:
mkdir -p ./output
generate: get-target output-dir
BASHLY_SOURCE_DIR=$(TARGET) bashly 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)
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/