From e608ab4f228cf477b5f0fd0d696608347c645b99 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Thu, 11 Apr 2024 14:55:32 +0300 Subject: [PATCH] Add timeout for downloading --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 41f758c..0636776 100755 --- a/install.sh +++ b/install.sh @@ -7,7 +7,7 @@ set -e ################################################################################ -VERSION="2.4.0" +VERSION="2.4.1" ################################################################################ @@ -45,7 +45,7 @@ CL_BL_GREY="\e[1;${GREY};49m" ################################################################################ GH_CONTENT="https://raw.githubusercontent.com" -REPOSITORY="$GH_CONTENT/andyone/dotfiles/master/" +REPOSITORY="$GH_CONTENT/andyone/dotfiles/master" OMZ_INSTALL="$GH_CONTENT/robbyrussell/oh-my-zsh/master/tools/install.sh" ################################################################################ @@ -325,7 +325,7 @@ download() { local rnd http_code rnd=$(tr -cd '[:alnum:]' < /dev/urandom | fold -w8 | head -n1) - http_code=$(curl -s -L -w "%{http_code}" -o "$dir/$name" "$REPOSITORY/${name}?r${rnd}") + http_code=$(curl -sL -m 10 -w "%{http_code}" -o "$dir/$name" "$REPOSITORY/${name}?r${rnd}") if [[ "$http_code" != "200" ]] ; then return 1