41 lines
1.9 KiB
Diff
41 lines
1.9 KiB
Diff
From 61ea1534ff7026009a3435575c7beee91534db83 Mon Sep 17 00:00:00 2001
|
|
From: Joost VandeVondele <Joost.VandeVondele@gmail.com>
|
|
Date: Mon, 19 Dec 2022 17:54:36 +0100
|
|
Subject: [PATCH] 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 https://github.com/official-stockfish/Stockfish/pull/4291
|
|
closes https://github.com/official-stockfish/Stockfish/pull/4253
|
|
|
|
No functional change
|
|
---
|
|
src/Makefile | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/Makefile b/src/Makefile
|
|
index da81ceb4a0..bcf0abdf5e 100644
|
|
--- a/src/Makefile
|
|
+++ b/src/Makefile
|
|
@@ -853,7 +853,7 @@ net:
|
|
$(eval nnuedownloadurl2 := https://github.com/official-stockfish/networks/raw/master/$(nnuenet))
|
|
$(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))
|
|
@if [ "x$(curl_or_wget)" = "x" ]; then \
|
|
- echo "Automatic download failed: neither curl nor wget is installed. Install one of these tools or download the net manually"; exit 1; \
|
|
+ echo "Neither curl nor wget is installed. Install one of these tools unless the net has been downloaded manually"; \
|
|
fi
|
|
$(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))
|
|
@if [ "x$(shasum_command)" = "x" ]; then \
|
|
@@ -864,7 +864,9 @@ net:
|
|
echo "$(nnuenet) available."; \
|
|
else \
|
|
if [ "x$(curl_or_wget)" != "x" ]; then \
|
|
- echo "Downloading $${nnuedownloadurl}"; $(curl_or_wget) $${nnuedownloadurl} > $(nnuenet);\
|
|
+ echo "Downloading $${nnuedownloadurl}"; $(curl_or_wget) $${nnuedownloadurl} > $(nnuenet);\
|
|
+ else \
|
|
+ echo "No net found and download not possible"; exit 1;\
|
|
fi; \
|
|
fi; \
|
|
if [ "x$(shasum_command)" != "x" ]; then \
|