2024-03-04 22:32:08 +00:00
|
|
|
##
|
|
|
|
# esv command line bible
|
|
|
|
#
|
|
|
|
|
|
|
|
PREFIX = /usr/local
|
|
|
|
|
2024-03-05 02:19:45 +00:00
|
|
|
|
2024-03-04 22:32:08 +00:00
|
|
|
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:
|
2024-03-05 02:19:45 +00:00
|
|
|
rm -f esv ESV.json esv.zip
|
2024-03-04 22:32:08 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2024-03-05 02:19:45 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
|
2024-03-04 22:32:08 +00:00
|
|
|
.PHONY: test clean install uninstall
|
|
|
|
|
|
|
|
# end
|