X-Git-Url: https://git.ladys.computer/OldStandard/blobdiff_plain/93335c103118506ad3133f4a455636082b787ce6..607f9cc118bfbe89c7e8b16fbf05425f12e7c3c4:/makefile

diff --git a/makefile b/makefile
index 8f23d3d..a7b8032 100644
--- a/makefile
+++ b/makefile
@@ -1,31 +1,42 @@
 pkg := oldstandard
-ver  := $(shell grep '\\edef\\pkgver' $(pkg).tex | grep -Eo '[0-9]?\.[0-9]?')
+ver  := $(shell grep '\\edef\\pkgver' $(pkg).tex | grep -Eo '[0-9]{1,}\.[0-9]{1,}[a-z]{,1}')
 TEXMFDIR := $(shell kpsewhich -expand-var='$$TEXMFHOME')
 HOMEDIR := $$HOME
 LOCALFONTDIR := $(HOMEDIR)/.local/share/fonts
 
 doc: local
-	lualatex --shell-escape $(pkg).tex
-	biber $(pkg)
-	lualatex --shell-escape $(pkg).tex
-	lualatex --shell-escape $(pkg).tex
+	@echo "Building the documentation. Please wait..."
+	lualatex --shell-escape $(pkg).tex >/dev/null
+	biber $(pkg) >/dev/null
+	lualatex --shell-escape $(pkg).tex >/dev/null
+	lualatex --shell-escape $(pkg).tex >/dev/null
+	@echo "Removing OldStandard .otf files from $(LOCALFONTDIR)..."
+	rm -f $(LOCALFONTDIR)/OldStandard-*.otf
+	luaotfload-tool --update
+	@echo "Done."
 
 all: doc
 
-local: clean
+local:
+	@rm -f $(LOCALFONTDIR)/OldStandard-*.otf
+	@echo "Installing latest OldStandard .otf files in $(LOCALFONTDIR)..."
 	cp otf/OldStandard-*.otf $(LOCALFONTDIR)/
 	luaotfload-tool --update
+	@echo "Done."
 
 package: doc
-	mkdir $(pkg)
-	cp *.{txt,md,tex,pdf} $(pkg)
-	cp otf/*.otf $(pkg)
-	tar czf $(pkg)-$(ver).tar.gz $(pkg)
+	mkdir $(pkg)-$(ver)
+	cp *.{txt,md,tex,pdf} $(pkg)-$(ver)
+	cp otf/*.otf $(pkg)-$(ver)
+	tar czf $(pkg)-$(ver).tar.gz $(pkg)-$(ver)
+	@echo "$(pkg)-$(ver).tar.gz has been created."
 
 clean:
+	@echo "Removing OldStandard .otf files from $(LOCALFONTDIR)..."
 	rm -f $(LOCALFONTDIR)/OldStandard-*.otf
 	luaotfload-tool --update
 	git clean -df
 	pandoc README.md -o about.html
+	@echo "Done."
 
-.PHONY: doc all local package clean prepare
+.PHONY: doc all local package clean