<commit_before># Install ok.sh; build the website/README; run the tests.

PROGRAM ?= ok.sh
DESTDIR ?= $(HOME)
DESTDIRB ?= /
VERSION	:=

.PHONY: dev
dev : .image
	docker run -it --rm -v $$PWD:/oksh oksh

.image :
	docker build -t oksh .
	touch $@

install : $(PROGRAM)
	cp $(PROGRAM) "$(DESTDIR)/bin/"
	chmod 755 "$(DESTDIR)/bin/$(PROGRAM)"
	cp $(PROGRAM) "$(DESTDIRB)bin/"
	chmod 777 "$(DESTDIRB)bin/$(PROGRAM)"

.PHONY: test
test :
	make -C tests all

.PHONY: version
version : readme
	sed -i -e "s/VERSION=.*/VERSION='$(VERSION)'/g" $(PROGRAM)
	git add $(PROGRAM) README.md
	git commit -m 'Update version to $(VERSION)'
	git tag -a $(VERSION) -s

.PHONY: shellcheck
shellcheck :
	make -C tests shellcheck

readme : $(PROGRAM)
	@ printf '<!---\nThis README file is generated. Changes will be overwritten.\n-->\n' > README.md
	@ printf '[![Build Status](https://travis-ci.org/whiteinge/ok.sh.svg?branch=master)](https://travis-ci.org/whiteinge/ok.sh)\n\n' >> README.md
	OK_SH_MARKDOWN=1 ./$(PROGRAM) help >> README.md

.PHONY: preview
preview :
	@ pandoc -f gfm < README.md > README.html

.PHONY: posixdocs
posixdocs:
	wget -np --mirror https://pubs.opengroup.org/onlinepubs/9699919799/
<commit_msg>Move test to top so that it is the default make target<commit_after># Install ok.sh; build the website/README; run the tests.

PROGRAM ?= ok.sh
DESTDIR ?= $(HOME)
DESTDIRB ?= /
VERSION	:=

.PHONY: test
test :
	make -C tests all

.PHONY: dev
dev : .image
	docker run -it --rm -v $$PWD:/oksh oksh

.image :
	docker build -t oksh .
	touch $@

install : $(PROGRAM)
	cp $(PROGRAM) "$(DESTDIR)/bin/"
	chmod 755 "$(DESTDIR)/bin/$(PROGRAM)"
	cp $(PROGRAM) "$(DESTDIRB)bin/"
	chmod 777 "$(DESTDIRB)bin/$(PROGRAM)"

.PHONY: version
version : readme
	sed -i -e "s/VERSION=.*/VERSION='$(VERSION)'/g" $(PROGRAM)
	git add $(PROGRAM) README.md
	git commit -m 'Update version to $(VERSION)'
	git tag -a $(VERSION) -s

.PHONY: shellcheck
shellcheck :
	make -C tests shellcheck

readme : $(PROGRAM)
	@ printf '<!---\nThis README file is generated. Changes will be overwritten.\n-->\n' > README.md
	@ printf '[![Build Status](https://travis-ci.org/whiteinge/ok.sh.svg?branch=master)](https://travis-ci.org/whiteinge/ok.sh)\n\n' >> README.md
	OK_SH_MARKDOWN=1 ./$(PROGRAM) help >> README.md

.PHONY: preview
preview :
	@ pandoc -f gfm < README.md > README.html

.PHONY: posixdocs
posixdocs:
	wget -np --mirror https://pubs.opengroup.org/onlinepubs/9699919799/

{'fraction_non_alphanumeric': 0.17794177941779418, 'fraction_numerical': 0.013940139401394014, 'mean_word_length': 3.6743295019157087, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 17, 'https://': 6, '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': '543148', 'n_tokens_mistral': 1036, 'n_tokens_neox': 981, 'n_words': 253}