Unverified Commit 21b0a4be authored by Kroese's avatar Kroese Committed by GitHub
Browse files

Compare

parent 7cc7d7ab
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -40,12 +40,12 @@ function downloadUpdate {
  remote_size=$(curl -sIk -m 4 "${URL}" | grep -i "content-length:" | tr -d " \t" | cut -d ':' -f 2)
  remote_size=${remote_size//$'\r'}

  [ "$remote_size" == "" || "$remote_size" == "0" ] && return
  [[ "$remote_size" == "" || "$remote_size" == "0" ]] && return

  SCRIPT=$(readlink -f ${BASH_SOURCE[0]})
  local_size=$(stat -c%s "$SCRIPT")

  [ remote_size -eq local_size ] && return
  [[ remote_size -eq local_size ]] && return

  if ! curl -sfk -m 10 -o "${TMP}" "${URL}"; then
    echo "$HEADER: curl error" && return