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"