Created
October 3, 2012 04:44
-
-
Save DamonOehlman/3825048 to your computer and use it in GitHub Desktop.
piping from getit, via zlib and untarring
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
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