Skip to content

Instantly share code, notes, and snippets.

@DamonOehlman
Created October 3, 2012 04:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DamonOehlman/3825048 to your computer and use it in GitHub Desktop.
Save DamonOehlman/3825048 to your computer and use it in GitHub Desktop.
piping from getit, via zlib and untarring
out('!{grey}retrieving recipes from !{grey,underline}{0}', target);
getit(target)
.on('end', out.bind(null, '!{grey}extracting recipes'))
.pipe(zlib.Gunzip())
.pipe(tar.Parse({ path: opts.bakery }))
.on('entry', function(entry) {
if (reLibrary.test(entry.path) && entry.type == 'File') {
promises.push(extractEntry(entry));
}
})
.on('end', function() {
when.all(promises, function() {
out('!{check,green} done');
if (callback) {
callback();
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment