- -e $cache and skip($url, 1);
- ok(defined runres(['curl', '-sS', $url, '-o', $cache, @params]), $url)
- or diag("download at $ref: $@");
+ # download to file
+ skip($url, 1) if $cached;
+ $cached = defined runres("curl -sSf $url$params -o $cache");
+ ok($cached, $url) or diag("download at $ref: $@");