Skip to content

Commit

Permalink
Add timeout for downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Apr 11, 2024
1 parent 4481e82 commit e608ab4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -e

################################################################################

VERSION="2.4.0"
VERSION="2.4.1"

################################################################################

Expand Down Expand Up @@ -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"

################################################################################
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e608ab4

Please sign in to comment.