Skip to content

Commit 4808202

Browse files
committed
[ADD] Check for installed system package
1 parent 069732d commit 4808202

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

‎.make/conf.d/django-esi.mk‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,28 @@
22

33
.PHONY: get-compatibility-dates
44
get-compatibility-dates:
5+
@if ! command -v jq >/dev/null 2>&1; \
6+
then \
7+
echo ""; \
8+
echo "$(TEXT_COLOR_RED)$(TEXT_BOLD)ERROR:$(TEXT_RESET) jq is required but not installed. Please install jq first."; \
9+
echo ""; \
10+
exit 1; \
11+
fi;
512
@echo "Fetching compatibility dates for ESI API..."; \
613
response=$$(curl -s "https://esi.evetech.net/meta/compatibility-dates"); \
714
if [ $$? -ne 0 ]; \
815
then \
9-
echo "Error: Failed to fetch compatibility dates"; \
16+
echo ""; \
17+
echo "$(TEXT_COLOR_RED)$(TEXT_BOLD)ERROR:$(TEXT_RESET) Failed to fetch compatibility dates"; \
18+
echo ""; \
1019
exit 1; \
1120
fi; \
1221
dates=$$(echo "$$response" | jq -r '.compatibility_dates[]' | sort -r); \
1322
if [ -z "$$dates" ]; \
1423
then \
15-
echo "Error: No dates found or invalid response"; \
24+
echo ""; \
25+
echo "$(TEXT_COLOR_RED)$(TEXT_BOLD)ERROR:$(TEXT_RESET) No dates found or invalid response"; \
26+
echo ""; \
1627
exit 1; \
1728
fi; \
1829
echo ""; \

0 commit comments

Comments
 (0)