diff options
| author | Douglas B. Rumbaugh <doug@douglasrumbaugh.com> | 2026-06-06 12:27:03 -0400 |
|---|---|---|
| committer | Douglas B. Rumbaugh <doug@douglasrumbaugh.com> | 2026-06-06 12:27:03 -0400 |
| commit | 0ecfe53b2d271133fac36de11ecfc0f7e47840f0 (patch) | |
| tree | 3ee8b5188936e350e15ff851b07a33031d366389 /Makefile | |
| parent | 04b385284a8559bde3df51bab950784a0fd28cfd (diff) | |
| download | sh-ves-0ecfe53b2d271133fac36de11ecfc0f7e47840f0.tar.gz | |
Initial version complete
I dusted this off after years and had Claude finish
it for me.
caveat emptor: this is largely (though not entirely)
LLM generated as of this commit
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 52 |
1 files changed, 38 insertions, 14 deletions
@@ -12,25 +12,49 @@ endif BIN_DIR=$(HOME)/.local/bin -# TODO: ves needs to be installed as a function in the user's -# shell. This will require making updates to their configuration -# file as part of the install process, which will require a bit -# of extra work. +all: + @echo "Nothing to build. Run 'make install' to install, 'make test' to run tests." + install: - - test -d $(DATA_DIR)/ves/bin || mkdir -p $(DATA_DIR)/ves/bin - - test -d $(DATA_DIR)/ves/lib || mkdir -p $(DATA_DIR)/ves/lib - - test -d $(DATA_DIR)/ves/envs || mkdir -p $(DATA_DIR)/ves/envs - - test -d $(CONF_DIR)/ves || mkdir -p $(CONF_DIR)/ves - - test -d $(BIN_DIR)/ves_scripts || mkdir -p $(BIN_DIR)/ves_scripts + -mkdir -p $(DATA_DIR)/ves/bin + -mkdir -p $(DATA_DIR)/ves/lib + -mkdir -p $(DATA_DIR)/ves/envs + -mkdir -p $(CONF_DIR)/ves + -mkdir -p $(BIN_DIR)/ves_scripts + -mkdir -p $(DATA_DIR)/man/man1 cp ./*.sh $(BIN_DIR)/ves_scripts chmod u+x $(BIN_DIR)/ves_scripts/* + cp ./man/ves.1 $(DATA_DIR)/man/man1/ves.1 + @if command -v fish > /dev/null 2>&1; then \ + mkdir -p $(CONF_DIR)/fish/functions $(CONF_DIR)/fish/completions; \ + cp ./ves.fish $(CONF_DIR)/fish/functions/ves.fish; \ + cp ./completions/ves.fish $(CONF_DIR)/fish/completions/ves.fish; \ + echo "fish detected: installed function and completions"; \ + fi + @echo "" + @echo "Installation complete. To enable sh-ves, add the following line" + @echo "to your shell's rc or profile file:" + @echo "" + @echo " . $(BIN_DIR)/ves_scripts/ves-init.sh" + @echo "" +test: + sh ./tests/run_tests.sh + @if command -v fish > /dev/null 2>&1; then \ + fish ./tests/run_tests.fish; \ + else \ + echo "fish not found, skipping fish shim tests"; \ + fi uninstall: - - test -f $(BIN_DIR)/ves && rm -f $(BIN_DIR)/ves - - test -d $(BIN_DIR)/ves_scripts && rm -rf $(BIN_DIR)/ves_scripts - + -rm -f $(BIN_DIR)/ves + -rm -rf $(BIN_DIR)/ves_scripts + -rm -f $(CONF_DIR)/fish/functions/ves.fish + -rm -f $(CONF_DIR)/fish/completions/ves.fish + -rm -f $(DATA_DIR)/man/man1/ves.1 purge: uninstall - - test -d $(DATA_DIR)/ves && rm -rf $(DATA_DIR)/ves - - test -d $(CONF_DIR)/ves && rm -rf $(CONF_DIR)/ves + -rm -rf $(DATA_DIR)/ves + -rm -rf $(CONF_DIR)/ves + +.PHONY: all install test uninstall purge |