mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 13:30:02 +08:00
Compare
This commit is contained in:
parent
5283c8c29f
commit
0269f3d944
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user