From 6028264cb991b99b3a51cf2fd01b6f1f6ce24cc3 Mon Sep 17 00:00:00 2001 From: Michel Van den Bergh Date: Sat, 22 Mar 2025 09:58:47 +0100 Subject: [PATCH] Delay check for curl/wget until really needed closes https://github.com/official-stockfish/Stockfish/pull/5938 No functional change --- scripts/net.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/net.sh b/scripts/net.sh index 0bc57a19..1aa1fbfb 100755 --- a/scripts/net.sh +++ b/scripts/net.sh @@ -3,11 +3,6 @@ wget_or_curl=$( (command -v wget > /dev/null 2>&1 && echo "wget -qO-") || \ (command -v curl > /dev/null 2>&1 && echo "curl -skL")) -if [ -z "$wget_or_curl" ]; then - >&2 printf "%s\n" "Neither wget or curl is installed." \ - "Install one of these tools to download NNUE files automatically." - exit 1 -fi sha256sum=$( (command -v shasum > /dev/null 2>&1 && echo "shasum -a 256") || \ (command -v sha256sum > /dev/null 2>&1 && echo "sha256sum")) @@ -47,6 +42,12 @@ fetch_network() { fi fi + if [ -z "$wget_or_curl" ]; then + >&2 printf "%s\n" "Neither wget or curl is installed." \ + "Install one of these tools to download NNUE files automatically." + exit 1 + fi + for url in \ "https://tests.stockfishchess.org/api/nn/$_filename" \ "https://github.com/official-stockfish/networks/raw/master/$_filename"; do