<commit_before>PREFIX ?= /usr/local
TASK_DONE = echo -e "\n✓ $@ done\n"

.PHONY: test

all:
	@echo "Usage:"
	@echo "  make install"
	@echo "  make reinstall"
	@echo "  make uninstall"
	@echo "  make test"

help:
	$(MAKE) all
	@$(TASK_DONE)

install:
	install -d -m 0755 $(PREFIX)/bin
	install -m 0755 git-quick-stats $(PREFIX)/bin/git-quick-stats
	git config --global alias.quick-stats '! $(PREFIX)/bin/git-quick-stats'
	$(MAKE) man
	@$(TASK_DONE)

uninstall:
	rm -f $(PREFIX)/bin/git-quick-stats
	rm -f $(PREFIX)/share/man/man1/git-quick-stats.1
	git config --global --unset alias.quick-stats
	@$(TASK_DONE)

reinstall:
	@curl -s https://raw.githubusercontent.com/arzzen/git-quick-stats/master/git-quick-stats > git-quick-stats
	$(MAKE) uninstall && \
	$(MAKE) install
	@$(TASK_DONE)

man:
	install -d -m 0755 $(PREFIX)/share/man/man1/
	install -m 0644 git-quick-stats.1 $(PREFIX)/share/man/man1/

test:
	tests/commands_test.sh
	@$(TASK_DONE)<commit_msg>Remove unnecessary Git alias<commit_after>PREFIX ?= /usr/local
TASK_DONE = echo -e "\n✓ $@ done\n"

.PHONY: test

all:
	@echo "Usage:"
	@echo "  make install"
	@echo "  make reinstall"
	@echo "  make uninstall"
	@echo "  make test"

help:
	$(MAKE) all
	@$(TASK_DONE)

install:
	install -d -m 0755 $(PREFIX)/bin
	install -m 0755 git-quick-stats $(PREFIX)/bin/git-quick-stats
	$(MAKE) man
	@$(TASK_DONE)

uninstall:
	rm -f $(PREFIX)/bin/git-quick-stats
	rm -f $(PREFIX)/share/man/man1/git-quick-stats.1
	@$(TASK_DONE)

reinstall:
	@curl -s https://raw.githubusercontent.com/arzzen/git-quick-stats/master/git-quick-stats > git-quick-stats
	$(MAKE) uninstall && \
	$(MAKE) install
	@$(TASK_DONE)

man:
	install -d -m 0755 $(PREFIX)/share/man/man1/
	install -m 0644 git-quick-stats.1 $(PREFIX)/share/man/man1/

test:
	tests/commands_test.sh
	@$(TASK_DONE)
{'fraction_non_alphanumeric': 0.17839335180055402, 'fraction_numerical': 0.02326869806094183, 'mean_word_length': 3.6666666666666665, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '577872', 'n_tokens_mistral': 788, 'n_tokens_neox': 754, 'n_words': 160}