Skip to content

Instantly share code, notes, and snippets.

@Grigore147
Created June 10, 2013 14:19
Show Gist options
  • Save Grigore147/5749039 to your computer and use it in GitHub Desktop.
Save Grigore147/5749039 to your computer and use it in GitHub Desktop.
Download and extract tarballs
var request = require('request');
var zlib = require('zlib');
var tar = require('tar');
var url = 'https://github.com/Shogun147/Katana/tarball/master';
var path = __dirname + '/katana';
request({ url: url }).pipe(zlib.createUnzip()).pipe(tar.Extract({ path: path }))
.on('end', function() {
console.log('Done!');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment