## # esv command line bible # Changelog: # 2024-03-04 Added download feature to pull esv without distributing with source PREFIX = /usr/local esv: esv.sh esv.awk esv.tsv cat esv.sh > $@ echo 'exit 0' >> $@ echo '#EOF' >> $@ tar czf - esv.awk esv.tsv >> $@ chmod +x $@ test: esv.sh shellcheck -s sh esv.sh clean: rm -f esv ESV.json esv.zip install: esv mkdir -p $(DESTDIR)$(PREFIX)/bin cp -f esv $(DESTDIR)$(PREFIX)/bin chmod 755 $(DESTDIR)$(PREFIX)/bin/esv uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/esv esv.tsv: download download: ifeq ("$(wildcard ./esv.tsv)","") # Check if the file exists before downloading ifeq ( $(strip $(unzip -v)), ) curl --location \ --request GET "https://bolls.life/static/translations/ESV.json" \ -o ESV.json else curl --location \ --request GET "https://bolls.life/static/translations/ESV.zip" \ -o esv.zip unzip esv.zip endif ./convert.py endif .PHONY: test clean install uninstall # end