diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-01-01 13:36:10 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2014-01-01 13:36:10 (GMT) |
commit | bd90d958b4f4e9d2fc534cd7bd8a28278fe21546 (patch) | |
tree | 2a411b44fad733014ef534284b6f2fc5b4b94f96 /bin | |
parent | 5e61217e20794fc55f9e1625fcd73d06df89b4e1 (diff) | |
download | site-bd90d958b4f4e9d2fc534cd7bd8a28278fe21546.tar.gz |
check-mirrors: Have curl(1) retry FTP transfers
Don't give up immediately if transferring the timestamp file failed.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/check-mirrors | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/check-mirrors b/bin/check-mirrors index f1fb6fd..4859a63 100755 --- a/bin/check-mirrors +++ b/bin/check-mirrors | |||
@@ -136,7 +136,8 @@ for mirror in $mirrors | |||
136 | do | 136 | do |
137 | url="${mirror%/}/timestamp" | 137 | url="${mirror%/}/timestamp" |
138 | 138 | ||
139 | if curl -s -S -O -m 600 --ftp-method 'nocwd' "$url" >'curl.log' 2>&1 | 139 | if curl -s -S -O -m 600 --retry 2 --ftp-method 'nocwd' "$url" \ |
140 | >'curl.log' 2>&1 | ||
140 | then | 141 | then |
141 | cmp -s 'expected' 'timestamp' \ | 142 | cmp -s 'expected' 'timestamp' \ |
142 | || echo >&2 "$mirror is outdated ($(cat 'timestamp'))." | 143 | || echo >&2 "$mirror is outdated ($(cat 'timestamp'))." |