feat[makefile,convert] Added makefile checks

I added further makefile checks for existing files.
I also corrected the shebang on convert.py
This commit is contained in:
Judah Sotomayor 2024-03-05 00:10:54 -05:00
parent 6244d5f258
commit fb042840b1
Signed by: judahsotomayor
SSH Key Fingerprint: SHA256:9Dq4ppxhfAjbX+7HLXEt+ROMiIojI6kqQgUyFUJb9lI
2 changed files with 5 additions and 1 deletions

View File

@ -32,13 +32,17 @@ esv.tsv: download
download: download:
ifeq ("$(wildcard ./esv.tsv)","") # Check if the file exists before downloading ifeq ("$(wildcard ./esv.tsv)","") # Check if the file exists before downloading
ifeq ( $(strip $(unzip -v)), ) ifeq ( $(strip $(unzip -v)), )
ifeq ("$(wildcard ./ESV.json)","") # Check if the file exists before downloading
curl --location \ curl --location \
--request GET "https://bolls.life/static/translations/ESV.json" \ --request GET "https://bolls.life/static/translations/ESV.json" \
-o ESV.json -o ESV.json
endif
else else
ifeq ("$(wildcard ./esv.zip)","") # Check if the file exists before downloading
curl --location \ curl --location \
--request GET "https://bolls.life/static/translations/ESV.zip" \ --request GET "https://bolls.life/static/translations/ESV.zip" \
-o esv.zip -o esv.zip
endif
unzip esv.zip unzip esv.zip
endif endif
./convert.py ./convert.py

View File

@ -1,3 +1,4 @@
#!/usr/bin/env python3
# Convert.py # Convert.py
# Copyright (C) 2024 Judah Sotomayor # Copyright (C) 2024 Judah Sotomayor
@ -14,7 +15,6 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
#/usr/bin/env python3
import json import json
import pandas import pandas
import re import re