Skip to content

Commit 61ea153

Browse files
committed
No error if net available but wget/curl missing
do not error out on missing wget/curl if these tools are not needed later on, i.e. if the net is available already. closes #4291 closes #4253 No functional change
1 parent 3a32d3e commit 61ea153

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ net:
853853
$(eval nnuedownloadurl2 := https://github.com/official-stockfish/networks/raw/master/$(nnuenet))
854854
$(eval curl_or_wget := $(shell if hash curl 2>/dev/null; then echo "curl -skL"; elif hash wget 2>/dev/null; then echo "wget -qO-"; fi))
855855
@if [ "x$(curl_or_wget)" = "x" ]; then \
856-
echo "Automatic download failed: neither curl nor wget is installed. Install one of these tools or download the net manually"; exit 1; \
856+
echo "Neither curl nor wget is installed. Install one of these tools unless the net has been downloaded manually"; \
857857
fi
858858
$(eval shasum_command := $(shell if hash shasum 2>/dev/null; then echo "shasum -a 256 "; elif hash sha256sum 2>/dev/null; then echo "sha256sum "; fi))
859859
@if [ "x$(shasum_command)" = "x" ]; then \
@@ -864,7 +864,9 @@ net:
864864
echo "$(nnuenet) available."; \
865865
else \
866866
if [ "x$(curl_or_wget)" != "x" ]; then \
867-
echo "Downloading $${nnuedownloadurl}"; $(curl_or_wget) $${nnuedownloadurl} > $(nnuenet);\
867+
echo "Downloading $${nnuedownloadurl}"; $(curl_or_wget) $${nnuedownloadurl} > $(nnuenet);\
868+
else \
869+
echo "No net found and download not possible"; exit 1;\
868870
fi; \
869871
fi; \
870872
if [ "x$(shasum_command)" != "x" ]; then \

0 commit comments

Comments
 (0)