Last active
August 29, 2015 13:58
-
-
Save lkptrzk/10324416 to your computer and use it in GitHub Desktop.
get-spumko-makefiles.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// node get-spumko-makefiles.js && vim *.Makefile | |
var Async = require('async') | |
var Fs = require('fs') | |
var Request = require('request') | |
Request({ | |
uri: 'https://api.github.com/orgs/spumko/repos', | |
headers: { | |
'User-Agent': ' ' | |
} | |
}, function (err, res, repos) { | |
repos = JSON.parse(repos) | |
repos.forEach(function (repo) { | |
Request({ | |
uri: repo.html_url + '/raw/master/Makefile', | |
headers: { | |
'User-Agent': ' ' | |
} | |
}, function (err, res, makefile) { | |
if (err) { | |
return console.dir(err) | |
} | |
Fs.writeFileSync(repo.name + '.Makefile', makefile) | |
}) | |
}) | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment