var fs = require("fs"); var path = require("path"); try { fs.mkdirSync("./tmp"); } catch (e) { if (e.code != "EEXIST") throw e; } function local(url) { return path.join("./tmp", encodeURIComponent(url)); } function read(url) { return fs.createReadStream(local(url)); } module.exports = function(url, callback) { var result = read(url); result.on("error", function(e) { if (e.code != "ENOENT") return callback(e); require(url.slice(0, url.indexOf(":"))).get(url, function(res) { if (res.statusCode !== 200) return callback(res); res.pipe(fs.createWriteStream(local(url)).on("close", function() { callback(null, read(url)); })); }); }).on("open", function() { callback(null, result); }); }; 'selected'>koszko Wojtek's customized Guix
aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/wget.scm
AgeCommit message (Expand)Author
2020-09-05Merge remote-tracking branch 'origin/master' into stagingEfraim Flashner
2020-09-01gnu: wgetpaste: Update bpaste URL & regular expressions....* gnu/packages/wget.scm (wgetpaste)[source]: Add patch. * gnu/packages/patches/wgetpaste-update-bpaste.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Tobias Geerinckx-Rice
2020-09-01gnu: wgetpaste: Update to 2.30....* gnu/packages/wget.scm (wgetpaste): Update to 2.30. Tobias Geerinckx-Rice
2020-09-01gnu: wgetpaste: Use HTTPS home page....* gnu/packages/wget.scm (wgetpaste)[source, home-page]: Use HTTPS. Tobias Geerinckx-Rice
2020-09-01gnu: wgetpaste: Fix historical confusion....* gnu/packages/wget.scm (wgetpaste)[arguments]: Fix the reversed substitution and clarify its purpose. Tobias Geerinckx-Rice
2020-07-03gnu: wget: Cross-build fix....* gnu/packages/wget.scm (wget)[inputs]: Move lzip to ... [native-inputs]: ... here. Jan (janneke) Nieuwenhuizen
2020-04-22gnu: wget2: Add support for gnu updater....* gnu/packages/wget.scm (wget2)[properties]: New field. Add ftp-directory. Efraim Flashner