From 2a023070e7a54f501913509752b7a28b8b20c4fb Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 14 Jun 2023 15:41:14 +0400 Subject: [PATCH] =?UTF-8?q?update-nutools:=20prendre=20le=20d=C3=A9p=C3=B4?= =?UTF-8?q?t=20public=20par=20d=C3=A9faut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update-nutools | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/update-nutools b/update-nutools index 09db8f7..233eb9e 100755 --- a/update-nutools +++ b/update-nutools @@ -62,16 +62,16 @@ WGET="$(which wget 2>/dev/null)" if [ -n "$NUTOOLS_REPO" ]; then REPO="$NUTOOLS_REPO" elif [ -n "$CURL" ]; then - if curl -fs "$PRIV_REPO" >&/dev/null; then - REPO="$PRIV_REPO" - else + if curl -fs -m 3 "$PUB_REPO" >&/dev/null; then REPO="$PUB_REPO" + else + REPO="$PRIV_REPO" fi elif [ -n "$WGET" ]; then - if wget -q -O - "$PRIV_REPO" >&/dev/null; then - REPO="$PRIV_REPO" - else + if wget -q --timeout=3 -O - "$PUB_REPO" >&/dev/null; then REPO="$PUB_REPO" + else + REPO="$PRIV_REPO" fi else REPO="$PUB_REPO"